my app on iPhone 6,6s,6p and 6sp is stretched afte

2020-04-14 08:12发布

问题:

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.



标签: ios ios9