Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't scale device window in iOS Simulator

On the 24" iMac I'm using at work I cannot scale the iOS Simulator's window. The 100% and 50% menu entries are greyed out (and the keyboard shortcuts don't work either.)

On my Mac Mini at home, it's fine. I've searched high and low for someone with a similar problem, and can't find anything logged. Any ideas?

like image 951
vlad259 Avatar asked Feb 28 '11 12:02

vlad259


People also ask

How do I make iOS Simulator smaller?

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

How do I change the Simulator size in Xcode?

In Xcode 9 there is a new "Actual Size" option. In the Simulator to the Window menu and choose Scale > Actual Size to trigger it.

Does CloudKit work in Simulator?

CloudKit does not work with Simulator.

How do you zoom in on iPhone Simulator?

You can use Option (Alt) button or combination of Option button and command button along with mouse movement to zoom in and zoom out a map or an image.


2 Answers

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.

enter image description here

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



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

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 Menu:
Xcode 9.1+:

Menubar ▶ Window ▶ "Here, options available to 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 to 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.

like image 197
Krunal Avatar answered Oct 06 '22 08:10

Krunal


The options will only be there if your screen is not large enough to show the window at 100%.

like image 43
Steven Kramer Avatar answered Oct 06 '22 08:10

Steven Kramer