How to add iPhone 5 large screen support to iOS apps in Xcode? [duplicate]

房东的猫 提交于 2019-12-17 06:13:12

问题


Possible Duplicate:
How to deal with iPhone 5 screen size?

How can I add support for 4-inch iPhone 5 displays to an iOS app in Xcode?

Is this even possible with the latest public Xcode release, v4.4.1?


回答1:


Add a new launch image named Default-568h@2x.png to your project and it will work!




回答2:


If your application is iOS6 only, the easiest way to make views that layout correctly in both 3.5-inch and 4-inch iPhone 5 designs is to use AutoLayout in your XIBs to make them adapt their size automatically (See the WWDC'2012 video sessions about that). If your application must support versions prior to iOS6, then you can still use AutoResizingMasks on your views to make them resize themselves to adapt to both 3.5 and 4 inch screens.

Then for your application to support the 4-inch display and take the whole screen when launched on an iPhone 5, simply add a "Default-568h@2x.png" launch image to your project. The simple presence of this launch image will make your application launch full-screen on iPhone 5 instead of having black bands at the top and bottom.




回答3:


Short answer : use the new launch image slot ( the Retina 4-inch ) one in XCode->Targets->Summary->iPhone/iPod Deployment Info

I have an OpenGL ES 2 app that despite all options I checked, nothing worked. Creating a new GLGame project adds black launch images for Retina 3.5 inch and Retina 4 inch. Despite every other comparison to project settings or .plist file I found nothing else to say "make it available for iPhone 5". I sure hope this changes in the future.



来源:https://stackoverflow.com/questions/12396143/how-to-add-iphone-5-large-screen-support-to-ios-apps-in-xcode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!