简体   繁体   English

在iPad上模拟器与部署方面的差异

[英]Differences in simulator vs deployment on iPad

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. 我刚刚将我的iPhone应用程序部署到了iPad 2(只有我拥有的iOS设备)上,却惊讶地发现了这种差异(如果我无法弄清楚它们之间的功能差异,我将在另一篇文章中解决)每个系统如何显示事物。

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. 该应用程序是在Macbook Pro上使用Xcode 5.1为iOS 7,iPhone retina 4英寸开发的。我已将其部署到非视网膜2011 iPad 2上。

First, the full screenshot from the iPad: 首先,来自iPad的完整屏幕截图:

在此处输入图片说明

Now, the iPad version cropped to just the iPhone screen vs the display in the sim: 现在,iPad版本只能显示为iPhone屏幕,而SIM卡则可以显示:

在此处输入图片说明

Questions: 问题:

1) Is this the normal display for an iPhone app on an iPad? 1)这是iPad上iPhone应用程序的正常显示吗?

2) Can I change it? 2)我可以更改吗?

3) Why is it cutting the bottom off the screen? 3)为什么从屏幕上切下底部?

Any ideas? 有任何想法吗?

Thanks! 谢谢!

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. 即使您在4英寸iPhone模拟器中运行它,也不意味着人们无法在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 ). 当您开发仅iPhone应用程序并在iPad上运行该应用程序时,其行为是将其显示在屏幕中间的中央,并显示一个2x按钮对其进行缩放( 仅限视网膜iPads )。 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 ). 对于非视网膜iPad,其行为是将其以2x模式显示,并且无法对其进行更改,因为它没有足够的像素密度来显示它(来自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. 对于4英寸iPhone,它是16:9,对于iPad,它是4:3。

You can see a screen comparison here: http://www.iosres.com 您可以在此处查看屏幕比较: http : //www.iosres.com

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM