Differences in simulator vs deployment on iPad

心已入冬 提交于 2019-12-24 00:38:12

问题


I just deployed my iPhone app to my iPad 2 (only iOS device I've got) and was surprised to see this difference (among other, functional, differences that I'll address in another post if I can't figure them out) in how each system displays the thing.

The app was developed for iOS 7, iPhone retina 4", using Xcode 5.1 on a Macbook Pro. I deployed to a non-retina 2011 iPad 2.

First, the full screenshot from the iPad:

Now, the iPad version cropped to just the iPhone screen vs the display in the sim:

Questions:

1) Is this the normal display for an iPhone app on an iPad?

2) Can I change it?

3) Why is it cutting the bottom off the screen?

Any ideas?

Thanks!


回答1:


Even if you are running it in a 4" iPhone Simulator, it doesn't mean that people are not able to use it in a 3.5" iPhone.

So, answering your questions:

  1. Yes. When you are developing an iPhone only app and running it in an iPad, the behaviour is to display it centered in the middle of the screen and present a 2x button to zoom on it (retina iPads only). For non-retina iPads, the behaviour is to display it in 2x mode and there is no way to change it, because it doesn't have enough pixel density to display it (from https://stackoverflow.com/a/18970516/805647).

  2. To change it, you must create an Universal application and create layouts for both devices.

  3. It is cutting because the screen aspect ratio of those devices are different. For a 4" iPhone it is 16:9 and for an iPad, it is 4:3.

You can see a screen comparison here: http://www.iosres.com



来源:https://stackoverflow.com/questions/26195221/differences-in-simulator-vs-deployment-on-ipad

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