通用应用程序在iOS 6中使用错误的Xib for iPad 6模拟器
问题描述:
在模拟器中,我的通用应用程序在iOS 5中运行良好,但在iOS 6中,它抓取MainWindow.xib而不是MainWindow〜ipad.xib。我有“Main Nib File Base Name(iPad)”(NSMainNibFile〜ipad)在plist中正确设置。其他组合均可正常工作(iOS 5上的iPhone,iPhone HD,iPhone 5和iPad; iOS 6上的iPhone,iPhone HD和iPhone 5)。通用应用程序在iOS 6中使用错误的Xib for iPad 6模拟器
下面是从plist中的相关章节:
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>NSMainNibFile~ipad</key>
<string>MainWindow~ipad</string>
我在我束手无策,已经从头开始重建iPad的厦门国际银行,重置模拟器,清洗Xcode的高速缓存(清洁菜单选项和DerivedData文件夹) ,以及其他所有我想不到牺牲一只鸡的东西(包括Universal app for iPad not loading iPad .xib files?的想法)。我正在Lion上运行当前版本的Xcode(4.5.2)。
任何想法?谢谢!
答
解决方案:使用“MainWindow〜iPhone.xib”(iPhone)和“MainWindow.xib”(iPad)。
答案在这个老后发现:
http://oleb.net/blog/2010/04/universal-app-is-not-a-universal-binary/
,但也是在上面(我有一些其他的问题,包括一些失踪XIB连接,这可能导致其失败的连接线对我来说)。
对不起,虚惊一场。所做的只是让iPad版本和iPhone版本失效。 – user1281726
真正的解决方案:“你可以显式指定nib文件,在右边的属性选项卡下的Xib/MainWindow-iPhone.xib/Base ViewC中,你会看到一个View Controller部分。 NIB Name,选择BaseViewC-iPhone,对其余的Xib文件执行相同操作。“ – user1281726