Reduce the Xcode Simulator (Retina 4 inch)

 ̄綄美尐妖づ 提交于 2019-12-03 18:49:14

问题


I'm using macbook Air and using the iphone Simulator. I changed it to Retina 4 inch, and the screen of the simulator become so big! is there a way to reduce the size?


回答1:


You can scale it with the following shortcuts:

  • +1: 100%
  • +2: 75%
  • +3: 50%
  • +4: 33%
  • +5: 25%

Or in iOS Simulator: Window > Scale > ...




回答2:


The iOS Simulator's Window menu has an option to display the simulator at 50%, 75%, or 100%. Try one of the smaller values to make it fit.




回答3:


Now It's more flexible with Xcode 9-Simulator.

You can pick & drag any corner or simulator to resize it and set it according to your requirement.


There are several other ways also, to scale your simulator.

Using Terminal Command
Follow these steps to scale simulator using terminal commands

  1. Close/Quit simulator. (if open)
  2. Open Terminal app (using Spotlight search, Press ⌘ + SPACE to open spotlight search)
  3. Copy following text and paste it next to terminal cursor.

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

  1. Open 'Simulator' (Run your iOS project using Xcode).

You will find simulator scale update.



Simulator scale options from Xcode Menu:

Menubar >> Window >> Scale >> "Here available options for simulator scaling"

Here is ref snapshot:



来源:https://stackoverflow.com/questions/12957380/reduce-the-xcode-simulator-retina-4-inch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!