17

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?

Krunal
  • 77,632
  • 48
  • 245
  • 261
vlad259
  • 1,236
  • 10
  • 24

7 Answers7

33

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.

Krunal
  • 77,632
  • 48
  • 245
  • 261
17

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

Steven Kramer
  • 8,473
  • 2
  • 37
  • 43
3

For Xcode 9, we detect the size of your screen. If it isn't large enough to display the window we disable the relevant scaling option.

As Krunal points out you can now drag to scale the window to whatever arbitrary size you want so this shouldn't be a problem. (In previous releases you could only pick from pre-defined sizes; the window itself was not resizable).

russbishop
  • 16,587
  • 7
  • 61
  • 74
  • 2
    thanks for your answer. I want to point out that sometimes we *need* the 100% scale - even on macs with smaller screen - to see precisely how 1-or-less-point-wide content is laid out. Which we can't do now it seems. Do you have any suggestion? – user1244109 Sep 29 '17 at 01:49
  • 2
    @user1244109 Please file a bug request and explain why you find that behavior useful; motivating examples are always helpful – russbishop Sep 29 '17 at 19:56
  • 3
    The fact that I just photoshop-upscaled screenshots that I can upload to itunesconnect seems quite motivating to me – Warrick Oct 09 '17 at 02:58
2

I solved this problem by changing the resolution of my Macbook Pro screen to biggest supported value, And increase the size of the simulator by drag and it's work! I can now attach iPad screenshot. Thanks Apple it's totally easy like always!.

Abdulaziz Noor
  • 6,413
  • 2
  • 19
  • 21
1

I can confirm that @Abdulaziz Noor method of changing the resolution of your mac display works.

Steps I took:

System Preferences -> Displays -> Display -> Scaled -> More Space 
KING
  • 938
  • 8
  • 26
0

If you are just wanting a 100% screen shot you can just drag it to be anything at least as big as 100% and the screenshot will be the same as a 100% screenshot.

Bolo
  • 1,494
  • 1
  • 19
  • 19
0

Even in xcode9 it won't let you set the scaling to 100% if your screen can't accommodate that, but you can cheat.. ..just choose landscape orientation and if the width of the device will fit the height of the screen, you can choose 100%, and then rotate the device even if it won't all fit on screen.

P A
  • 1