在Universal(iPad,iPhone,iPod)应用程序开发中测试不同的屏幕分辨率 [英] Testing different screen resolutions in Universal (iPad,iPhone,iPod) app development

查看:107
本文介绍了在Universal(iPad,iPhone,iPod)应用程序开发中测试不同的屏幕分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到在将通用应用提交到应用商店时,需要支持各种屏幕分辨率.我认为iPhone/iPod:320x460、320x480、640x960和iPad 768x1024.

I notice when submitting a Universal app to the app store, there are various screen resolutions to support. I think iPhone/iPod: 320x460, 320x480, 640x960 and iPad 768x1024.

当我在Xcode中指定通用应用开发时,模拟器的分辨率为320x480.要查看768x1024的屏幕分辨率,我可以将目标设置更改为iPad,但是如何测试320x460和640x960的分辨率?

When I specify Universal app development in Xcode, the simulator has a resolution of 320x480. To view 768x1024 screen resolution, I can change the target setting to iPad, but how to test 320x460 and 640x960 resolutions?

我的默认解决方案是针对iPad,并手动破解我的代码,例如:SCREEN_WIDTH=640, SCREEN_HEIGHT=960;,但是肯定会在模拟器上为此设置一个设置!?

My default solution is to target iPad, and manually hack my code, e.g.: SCREEN_WIDTH=640, SCREEN_HEIGHT=960; but surely there should be a setting on the simulator for this!?

在一个相关的问题中,是否有任何方法可以使屏幕捕获脱离模拟器(除了Command-Shift-3并裁剪生成的图像)​​?

In a related question, is there any way to get screen captures off the simulator (apart from command-shift-3 and cropping the resulting image)?

谢谢.

推荐答案

640x960是iPhone4.您只需在模拟器设备菜单中选择"iPhone 4"即可.您会发现,所有东西的体积都是原来的两倍(除非您的计算机的屏幕很小).

640x960 is an iPhone 4. You can simply select "iPhone 4" in the simulator device menu. You'll notice everything is twice as big (unless your computer has a small screen).

根据[[UIScreen mainScreen] applicationFrame].size,请参阅

The iPhone 4 will still say its screen is 320x480 according to [[UIScreen mainScreen] applicationFrame].size see here for a discussion.

460x320是标准的iPhone/iPod Touch屏幕减去状态栏的大小.您不需要与480x320分开支持它.

460x320 is the standard iPhone/iPod Touch screen minus the size of the status bar. You don't need to support it separately from 480x320.

注意:在最近的模拟器版本中,"iPhone 4"选项已重命名为"iPhone(Retina)".

Note: The "iPhone 4" option has been renamed "iPhone (Retina)" in recent simulator versions.

我认为没有更好的方法可以将屏幕截图从模拟器中移除.

I don't think there is a better way to get screen captures off the simulator.

这篇关于在Universal(iPad,iPhone,iPod)应用程序开发中测试不同的屏幕分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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