Force to zoom app in iOS9

ε祈祈猫儿з 提交于 2019-12-11 21:31:28

问题


I have an app that in iPhone 6 I want it to be scaled proportionally and zoomed. Basically I want to imitate the Applied ZOOM from Settings. At the moment, when I run the app with the Zoom mode from Settings, everything works fine but when I run it without that Zoom from Settings, the views displayed are smaller. How can I fix it?


回答1:


From Apple's What's New in iOS documentation:

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.

If you don't supply a launch screen file, (and also don't provide launch screen images for the iPhone 6 and 6 Plus), your app will be scaled instead of running in full screen mode.

Apple does recommend using size classes and Auto Layout so your app's UI would adapt. Your users may be dissatisfied with your choice to scale your app, as you will not be taking advantage of the larger screen sizes on these newer devices.




回答2:


Resolved just by adding the name Default-568h@2x.png for one of my launch images and now my app is scaled.I have to say that I didn't have a Storyboard launch screen file set. I was able to manage this thanks to the letterbox hint from @PetahChristian.

As for the black borders, you must provide some launch images, or iOS will think your app doesn't even support the 4" iPhones and letterbox it



来源:https://stackoverflow.com/questions/32695120/force-to-zoom-app-in-ios9

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