xcode iPhone 5 应用程序(4 英寸屏幕)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12664909/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
iPhone 5 Applications (4 inch Screen)
提问by The Man
Possible Duplicate:
How to develop or migrate apps for iPhone 5 screen resolution?
I'm (still) trying to convert one of my iPhone applications to iPhone 5, but it still looks like this in the simulator...
我(仍在)尝试将我的 iPhone 应用程序之一转换为 iPhone 5,但它在模拟器中仍然看起来像这样......
What am i doing and why won't it fill up the entire screen?
我在做什么,为什么它不会填满整个屏幕?


回答by Greg Hewgill
Have you provided a 4" sized launch image? That's the indicator that tells the OS that your application supports the full screen.
您是否提供了 4" 大小的启动图像?这是告诉操作系统您的应用程序支持全屏的指示器。
回答by Andrey
Have you selected in your UIView attributes inspector in XCode iPhone 5 screen size?
您是否在 XCode iPhone 5 屏幕尺寸的 UIView 属性检查器中选择了?


回答by Ambili Menon
Please have a look at the url, iPhone 5 TabBar not functioning in proper position
请查看网址, iPhone 5 TabBar 未在正确位置运行
Now, in xib, at the right side, under 'Interface Builder Document', put a tick-mark on use autolayoutand fix your objects in xib accordinlgy.
现在,在xib 的右侧,在“Interface Builder Document”下,在use autolayout上打勾并在xib 中根据accordinlgy修复您的对象。
回答by iSaalis
- Download and install Xcode 4.5 GM. Set a 4-inch launch image for your app. This is how you get 1136px screen height (without it, you will get 960px with black margins on top and bottom).
- Test your app, and hopefully do nothing else, since everything should work magically if you had set auto resizing masks properly. If you didn't, adjust your view layouts with proper auto resizing masks or look into Auto Layout if you only want to support iOS 6 going forward.
- 下载并安装 Xcode 4.5 GM。为您的应用设置一个 4 英寸的启动图像。这就是您获得 1136 像素屏幕高度的方法(没有它,您将获得 960 像素的顶部和底部的黑色边距)。
- 测试您的应用程序,希望不要做其他事情,因为如果您正确设置了自动调整大小蒙版,一切都会神奇地工作。如果没有,请使用适当的自动调整大小蒙版调整视图布局,或者如果您只想支持 iOS 6,请查看自动布局。
Also note: The auto-rotation API has changed completely, take a look at that as well if your application supports any rotation other than default.
另请注意:自动旋转 API 已完全更改,如果您的应用程序支持除默认值以外的任何旋转,请查看它。

