k06*_*06a 9 xcode ios ios6 xcode4.5 iphone-5
可能重复:
我如何支持更高的iPhone 5屏幕尺寸?
如何使我的应用程序4英寸准备好?我在iOS6GM模拟器中的应用程序看起来不是4英寸大小.在xcode中有任何选项可以使用全部4英寸吗?
Han*_*son 18
一些用户报告说在添加启动图像后它已被修复Default-568h@2x.png
(见下文).为了更新到iPhone5,我做了以下事情:
iOS 6中的自动旋转正在发生变化.在iOS 6中,shouldAutorotateToInterfaceOrientation:
不推荐使用UIViewController 的方法.取而代之的是,你应该使用supportedInterfaceOrientationsForWindow:
和shouldAutorotate
方法.因此,我添加了这些新方法(并保持旧的iOS 5兼容性):
-(BOOL)shouldAutorotate {
return YES;
}
- (NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskAllButUpsideDown;
}
Run Code Online (Sandbox Code Playgroud)
这只是记得在iOS 5和iOS 6中测试自动旋转因为旋转的变化.