本文介绍了在UIActionSheet中添加UIPickerView时,iOS 7上的上下文错误无效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在UIActionSheet中有一个UIPickerView,并且在SO的许多其他人建议的方式做到了这一点:

I have an UIPickerView inside an UIActionSheet and have done that in a way suggested by many others here at SO:

在iOS 7上测试我的应用程序时,解决方案一直运行良好。它仍然有效但是我在Xcode的运行期间收到了很多无效的上下文0x0警告。

The solutions have worked fine until now when testing my app on iOS 7. It still works but I got a lot of "invalid context 0x0" warnings during runtime in Xcode.

可能是Apple最终想要停止这种解决方案,还是它我们可以解决或修复的事情?

Could it be that Apple finally want to stop this kind of solution or is it something we can work around or fix?

推荐答案

正如上面的评论指出的那样,UIActionSheet并不是设计为子类或者是其他观点。

As the comments above point out, the UIActionSheet is not designed to be subclassed or take other views.

Apple的更多信息:

More info here at Apple:

一种方法是仔细查看DateCell示例代码并改为使用UIPickerView:

One approach is to look closer at the DateCell sample code and change that to use an UIPickerView instead:

这篇关于在UIActionSheet中添加UIPickerView时,iOS 7上的上下文错误无效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 12:12