<分区>
<分区>
Possible Duplicate:
What are the steps required to migrate existing apps to the iPhone 5 widescreen display?
How to deal with iPhone 5 screen size?
我有适用于 iPhone/iPad 的通用应用程序,但如您所知,Apple 于 9 月 12 日向我们展示了配备全新 4 英寸显示屏的新款 iPhone 5。如何为 iPhone 5 命名和制作 .xib 文件?现在有黑线代替
最佳答案
我通过执行以下步骤升级了一个通用应用程序:
Autorotation 在 iOS 6 中发生变化。在 iOS 6 中,UIViewController 的 shouldAutorotateToInterfaceOrientation:
方法已弃用。取而代之的是,您应该使用 supportedInterfaceOrientationsForWindow:
和 shouldAutorotate
方法。因此,我添加了这些新方法(并保留旧方法以兼容 iOS 5):
-(BOOL)shouldAutorotate {
return YES;
}
-(NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskAllButUpsideDown;
}
然后我为需要它的 View 修复了自动布局。记住要在 iOS 5 和 iOS 6 中测试自动旋转,因为旋转会发生变化。
将用于启动 View 的模拟器图像和用于 iTunes 商店的 View 复制到 PhotoShop 中,并将它们导出为 png 文件。默认图像的名称为:Default-568h@2x.png
大小为 640 x 1136,屏幕大小为 320 x 568。
我已经放弃了对 iOS 4 的向后兼容性。原因是这个新的 Xcode 不再支持 armv6 代码。因此,我现在能够支持的所有设备(运行 armv7)都可以升级到 iOS 5。
关于iphone - 我需要做什么来为 iPhone 5 重新制作/移植我的通用 iOS 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12407300/