How to resize the iPhone/iPad Simulator? How to resize the iPhone/iPad Simulator? ios ios

How to resize the iPhone/iPad Simulator?


It's more flexible with Xcode 9-Simulator.Just pick & drag any corner of simulator to resize it and set it according to your requirement.

Look at this snapshot:

enter image description here


Note: With Xcode 9.1+, Simulator scale options are changed.



Keyboard short-keys:
According to Xcode 9.1+

Physical Size       ⌘ 1      command + 1Pixel Accurate      ⌘ 2      command + 2


According to Xcode 9

50% Scale           ⌘ 1      command + 1100% Scale          ⌘ 2      command + 2200% Scale          ⌘ 3      command + 3

Simulator scale options from Xcode Menu:

Xcode 9.1+:
Menubar ▶ Window ▶ "Here, options available change simulator scale" (Physical Size & Pixel Accurate)

Pixel Accurate: Resizes your simulator to actual (Physical) device's pixels, if your mac system display screen size (pixel) supports that much high resolution, else this option will remain disabled.

enter image description here

Xcode 9.0
Menubar ▶ Window ▶ Scale ▶ "Here, options available change simulator scale"

enter image description here


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.



Xcode 9.x :

  1. Select Simulator
  2. Goto Window tab
  3. Select Physical Size option (cmd + 1)

Screenshot 1

Now if this dosen’t make size as per your interest then follow below steps :

  1. Select Simulator
  2. Goto edge of simulator. This will convert your cursor to resize option (Bidirectional arrow).
  3. Now using this resize option you can change the size as you desire.

Xcode 8 or below :

https://stackoverflow.com/a/30588057/1753005