iOS模拟器 - 只需一步即可从视网膜iPhone转换到非视网膜iPad [英] iOS simulator -- swap from retina iPhone to non-retina iPad in a single step

查看:89
本文介绍了iOS模拟器 - 只需一步即可从视网膜iPhone转换到非视网膜iPad的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为iPhone和iPad编程。在做iPhone的时候,我更喜欢视网膜iPhone模拟器。在做iPad的时候,我更喜欢非视网膜模拟器。在他们之间交换对我来说是一个两步的过程。我必须将xCode从iPhone模拟器目标切换到iPad模拟器目标。问题是,当我这样做时,模拟器从视网膜iPhone切换到视网膜iPad。因此,我还必须进入模拟器应用程序并将硬件更改为非视网膜iPad。

I program for both iPhone and iPad. When doing iPhone stuff, I prefer the retina iPhone simulator. When doing iPad stuff, I prefer the non-retina simulator. Swapping between them is a two-step process for me. I have to switch xCode from the "iPhone simulator" target to the "iPad simulator" target. The problem is that when I do this, the simulator switches from retina iPhone to retina iPad. I therefore also have to go into the simulator app and change the hardware to non-retina iPad.

有没有办法一步完成?

推荐答案

是的!它非常容易。在Xcode 4+中,点击播放按钮旁边顶部菜单栏中带有目标名称的下拉列表。然后单击编辑方案。

Yes! and its super easy. In Xcode 4+ click the dropdown with the name of your target in it in the top menu bar next to the play button. Then click edit scheme.

单击运行操作,然后单击选项选项卡。当您在Xcode中单击播放按钮(构建并运行)时,您将看到可以指定要使用的屏幕类型。

Click the run action and then click the Options tab. You will see you can specify the type of screen you want to use when you click the play button (build and run) in Xcode.

然后当您切换设备目标时Xcode会自动将模拟器切换到正确的设备和屏幕类型。

Then when you switch device target in Xcode it will automatically switch the simulator to the right device and screen type for you.

这篇关于iOS模拟器 - 只需一步即可从视网膜iPhone转换到非视网膜iPad的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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