升级到iOS9后,我在iPhone 6,6s,6p和6sp上的应用程序被拉伸了 [英] my app on iPhone 6,6s,6p and 6sp is stretched after upgrade to iOS9

查看:59
本文介绍了升级到iOS9后,我在iPhone 6,6s,6p和6sp上的应用程序被拉伸了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

该应用程序在ios9模拟器和任何装有ios8的真实设备上均可正常运行.但是在iphone 6和6p上,当ios升级到ios9时,应用程序会被拉伸,并且布局与iphone5相同.

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.

我还检查了images.xcassets中的LaunchImage.共有四个启动图像:Retina HD5.5,Retina HD4.7(iphone肖像ios8,9),2x和Retina 4(iphone肖像ios7-9).

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.

推荐答案

为您的Xcode提供LaunchScreen.xib文件而不是启动图像.这样,您可以肯定地解决您的问题.创建此xib文件后,导航至项目文件,然后定位至目标->信息->应用程序图标和启动图像->启动屏幕文件->选择创建的LaunchScreen.xib文件.完毕.利润.
在xib文件的该viewController中,您可以将UIImageView放入与launchImage相同的图像.

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.

顺便说一句,从iOS9开始,您可以用情节提要文件替换LaunchScreen.xib,但这据我所知仅在新的Xcode中有效.

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.

这篇关于升级到iOS9后,我在iPhone 6,6s,6p和6sp上的应用程序被拉伸了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆