且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

iOS模拟器 - 只需一步即可从视网膜iPhone转换到非视网膜iPad

更新时间:2023-10-20 13:47:34

是的!它非常容易。在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.