How do I resize the iOS simulator?
You can't. I've been an iOS software developer for two years and I haven't been able to find a way do this. I have tried to find solutions to this but came up with nothing. I'd love to be proven wrong, but I'm 99% certain there's no way to do this.
When my screen is too small I use 50% scale window, which is ought to be enough until I hook up my big monitor again at home.
EDIT: As of Xcode 9, you can resize it to any way you want from the corner of the simulator.
You can scale iOS Simulator to desire scale (I tried from .2 to 1.4 ) and it worked for me.
To do this you have to go to /Library/Preferences
and edit com.apple.iphonesimulator.plist
file. Edit value for key SimulatorWindowLastScale
to desire scale.
I tried this on latest version of Mountain Lion (10.8.4) and on the iOS 6.0 Simulator.
In Xcode 6.3 just press ⌘+5 (25% scale) or ⌘+4 (33% scale). Or in Window > Scale
Now It's more flexible with Xcode 9- Simulator. You can pick & drag any corner of simulator to resize it and set it according to your requirement.
Look at this snapshot:
Note: With Xcode 9.1+, Simulator scale options are changed.
Keyboard short-keys:
According to Xcode 9.1+
Physical Size ⌘ 1 command + 1
Pixel Accurate ⌘ 2 command + 2
According to Xcode 9
50% Scale ⌘ 1 command + 1
100% Scale ⌘ 2 command + 2
200% 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.
Xcode 9.0
Menubar ▶ Window ▶ Scale ▶ "Here, options available change simulator scale"
Using Terminal Command
Follow these steps to scale simulator using terminal commands
- Close/Quit simulator. (if open)
- Open
Terminal
app (using Spotlight search, Press⌘ + SPACE
to open spotlight search) - Copy following text and paste it next to terminal cursor.
defaults write ~/Library/Preferences/com.apple.iphonesimulator SimulatorWindowLastScale "0.3"
- Open 'Simulator' (Run your iOS project using Xcode).
You will find simulator scale update.