模拟器与iPad部署的差异 [英] Differences in simulator vs deployment on iPad

查看:160
本文介绍了模拟器与iPad部署的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将iPhone应用程序部署到了我的iPad 2(只有iOS设备),并且惊奇地看到了这个差异(除了其他的功能差异之外,如果我不能他们出来)每个系统如何显示的东西。



该应用程序是针对iOS 7开发的,iPhone视讯4,在Macbook Pro上使用Xcode 5.1,我部署到非视网膜2011 iPad 2。 >

首先,iPad的完整屏幕截图:





现在,iPad版本只裁剪到iPhone屏幕,而在sim中显示: / p>



问题:



1)iPad上的iPhone应用程序是否正常显示?



2)我可以更改吗?



3)为什么会将屏幕底部切掉?



任何想法?



谢谢!

解决方案

即使你在4iPhone模拟器中运行它,并不意味着人们无法在3.5iPhone中使用它。



所以,回答你的问题:


  1. 是的。当您开发仅iPhone应用程序并在iPad中运行时,其行为是将其显示在屏幕中央,并显示一个2x按钮以放大(仅限于视网膜iPad )。对于非视网膜iPad,其行为是以2x模式显示,无法更改它,因为它没有足够的像素密度来显示它(从 http://stackoverflow.com/a/18970516/805647 )。


  2. 要更改它,你必须创建一个通用应用程序并为这两个设备创建布局。


  3. 正在切割,因为这些设备的屏幕纵横比不同。对于4iPhone,它是16:9,而iPad是4:3。


请参阅屏幕比较: http://www.iosres.com


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!

解决方案

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 http://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

这篇关于模拟器与iPad部署的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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