What setting determines whether an app gets scaled for iPhone 6 and 6plus?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 13:00:45

问题


So when I run my project on the simulator for iPhone 6, with a deployment target of 7.1 I'm expecting everything to Scale automatically for the larger screen size.

But this is not happening. My UILabel which was previously horizontally in the center of a 320px wide storyboard screen, with a leading space constraint to the parent view, now shows up in the simulator with exactly that space constraint, instead of it being scaled. So it shows up off center, because the iPhone6 is wider.

What setting determines whether the app get's scaled for iPhone 6 and iPhone 6+ ???

Paul G.


回答1:


Ok, I found it:

What's new in iOS8

"To let the system know that your app supports the iPhone 6 screen sizes, include a storyboard launch screen file in your app’s bundle. At runtime, the system looks for a storyboard launch screen file. If such an file is present, the system assumes that your app supports the iPhone 6 and 6 Plus explicitly and runs it in fullscreen mode. If such an image is not present, the system reports a smaller screen size (either 320 by 480 points or 320 by 568 points) so that your app’s screen-based calculations continue to be correct. The contents are then scaled to fit the larger screen."

So I removed LaunchImage.xib (which was put there automatically) and I removed the entry for that in the plist.



来源:https://stackoverflow.com/questions/25962940/what-setting-determines-whether-an-app-gets-scaled-for-iphone-6-and-6plus

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