my app on iPhone 6,6s,6p and 6sp is stretched after upgrade to iOS9

此生再无相见时 提交于 2019-12-02 05:37:32

问题


The app works fine on ios9 simulator and on any real devices with ios8. But on iphone 6 and 6p, when ios upgrade to ios9, the app is stretched and the layout is same as iphone5.

I have also checked the LaunchImage in images.xcassets. There are four launch images:Retina HD5.5, Retina HD4.7(iphone portrait ios8,9), 2x and Retina 4(iphone portrait ios7-9).

I don't know why the app is stretched. Thank you.


回答1:


Provide LaunchScreen.xib file for your Xcode instead of launch images. This way you will eliminate your problem for sure. After creation of this xib file, navigate to your project file and to Target -> Info -> App Icons and Launch Images -> Launch Screen File -> select your created LaunchScreen.xib file. Done. Profit.
Inside that viewController in xib file you can put UIImageView with the same images you used as launchImage.

Btw, starting from iOS9 you can substitute your LaunchScreen.xib with storyboard file, but this will work only in new Xcode, as far as I know.



来源:https://stackoverflow.com/questions/32796924/my-app-on-iphone-6-6s-6p-and-6sp-is-stretched-after-upgrade-to-ios9

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