Changing iPad/iPhone simulator resolution for Xcod

2019-01-15 12:29发布

This question already has an answer here:

I am working on a Philips 19" and upgraded Xcode to version 4.3.2. On the new "Retina Display" on iPad 3 (oh, sorry, on The New iPad) my iPad simulator changes it's resolution and the simulator has vertical and horizontal scroll bars!

How do I change the resolution of the an iOS simulator?

5条回答
三岁会撩人
2楼-- · 2019-01-15 12:39

You can enable the retina display using - Hardware -> Device -> iPad

You can press cmd + 1 or cmd + 2 or cmd + 3 to change the size of the simulator. It will load the retina images but use a smaller simulator so you don't have to scroll for your testing.

查看更多
姐就是有狂的资本
3楼-- · 2019-01-15 12:40

In the menu bar:

Hardware -> Device -> iPad

查看更多
一纸荒年 Trace。
4楼-- · 2019-01-15 12:47

You can also in Simulator -> Window to choose the Physical Size, which will make the size as large as the iPhone physical size:

The shortcut key is Cmd + 1

查看更多
混吃等死
5楼-- · 2019-01-15 12:55

In addition to the cmd+1, cmd+2 and cmd+3 options under Window->Scale that zoom to 100%, 75% and 50% respectively, you can also kind of do a custom zoom amount by setting a custom preference. Namely, try setting the SimulatorWindowLastScale preference in the com.apple.iphonesimulator.plist file under ~/Library/Preferences directory. Running the following command in a terminal worked for me to be able to see the full screen of an iPad Air with iOS Simulator 8.2:

defaults write ~/Library/Preferences/com.apple.iphonesimulator SimulatorWindowLastScale "0.4"

See also https://apple.stackexchange.com/a/93313

查看更多
对你真心纯属浪费
6楼-- · 2019-01-15 12:59

The following hotkeys should be helpful:

  • Command ⌘ + 1 (100%)
  • Command ⌘ + 2 (75%)
  • Command ⌘ + 3 (50%)
  • Command ⌘ + 4 (33%)
  • Command ⌘ + 5 (25%)

Look at menu: "Window --> Scale" to see the options.

查看更多
登录 后发表回答