iphone 应用程序在 IOS 5.1 上运行良好,但在使用 IOS6 升级 XCode 4.5 后,它只显示初始屏幕,而不是模拟器中的空白。应用程序没有崩溃并收到大量弃用警告(主要是由于 presentModalViewController 和 dismissModalViewController)。请建议。
3 回答
If you're wondering how to fix the warnings you're getting about the presentModalViewController, here's what my updated version of the code looks like:
[self presentViewController:picker animated:YES completion:nil];
Note that presentModalViewController was renamed to exclude the Modal part, and note that completion:nil was added.
After you resolve all of the warnings, try again. My guess is that your issue will be resolved.
Hope this helps.
好吧,如果有问题presentModalViewController并且你在发布时展示了一些东西,那可能就是它没有展示的原因。
处理警告,看看会发生什么。
在将 XCode 4.x 项目转换到 XCode 4.5 时,这种情况经常发生。解决方法可能非常简单!
要让您的应用程序运行,您应该清除所有以前的构建信息。
为此,在 XCode 4.5 中,转到Product > Clean. 然后尝试运行您的应用程序。
如果还不够,请按“ Alt”键并单击Product > Clean Build Folder。
希望有帮助。
编辑:这不会解决弃用问题(presentModalViewController现在带有completion:iOS6 中的参数),但肯定会解决error: failed to attach to process ID 0问题!