Adjusting the Xcode iPhone simulator scale and size
Solution 1
You can't have 1:1 ratio.
However you can scale it from the iOS Simulator > Window > Scale
menu.
Solution 2
With Xcode 9 - Simulator, you can pick & drag any corner of simulator to resize it and set 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.
Tip: rotate simulator ( ⌘ + ← or ⌘ + → ), if Pixel Accurate is disabled. It may be enabled (if it fits to screen) in landscape.
Xcode 9.0
Menubar ▶ Window ▶ Scale ▶ "Here, options available change simulator scale"
Tip: How do you get screen shot with 100% (a scale with actual device size) that can be uploaded on AppStore?
Disable 'Optimize Rendering for Window scale' from Debug
menu, before you take a screen shot (See here: How to take screenshots in the iOS simulator)
There is an option
Menubar ▶ Debug ▶ Disable "Optimize Rendering for Window scale"
Here is Apple's document: Resize a simulator window
Solution 3
Check this Image… You can change your simulator size from here
or press CMD+1, CMD+2 or CMD+3
Solution 4
You can set any scale you wish. It`s became actual after 6+ simulator been presented
To obtain it follow next easy steps:
- quit simulator if open
- open terminal (from spotlight for example)
- paste next text to terminal and press enter
defaults write ~/Library/Preferences/com.apple.iphonesimulator SimulatorWindowLastScale "0.4"
You can try any scales changing 0.4 to desired value.
To reset this custom scale, just apply any standard scale from simulator menu in way described above.
Solution 5
You are seeing it huge because of your screen resolution. iPhone 5's display is 640x1136. Current resolution of your display can be found in System preferences, and it's height on notebooks is usually around 1000 px (give or take). So surely, the simulator in 1:1 scale will take all the height of the screen and even more.
The iPhone simulator has three scales, 100%, 75% and 50%. You can change between them any time by pressing CMD+1, CMD+2, CMD+3 or from Window menu.
Note that 100%-mode is very helpful for graphic checks, on full resolution you will be able to notice all defects or measure point size of the elements.
Related videos on Youtube
cdub
Updated on July 10, 2022Comments
-
cdub almost 2 years
Is there anyway to make the iOS simulator for iPhone 5 in Xcode, be the actual size of the iPhone 5. I'm getting a huge display and things seemed to be scaled.
-
Ashok almost 7 yearsBut in the smaller screens(MacBook Pro 15-Inch), I can't scale it more than the screen size sometimes if I want to see the UI elements more clearly. It's a kind of disadvantage in Xcode 9.
-
Krunal almost 7 years@AshokKumarS Yea, offcourse, you may not. Because your mouse cursor may not go outside screen boundary. Set scale 100%+ using Xcode menu to scale it larger than your display screen
-
joshuakcockrell over 6 yearsThese menu options have been removed in Xcode 9.1/9.2
-
Adam Bardon over 6 yearsWhat about "pixel accurate" option? Why it's disabled? Is there a way to enable it?
-
Dipen Panchasara over 6 years@AdamBardon i have added answer for
pixel accurate
, thanks for question, it would help many ;) -
Borzh over 6 yearsTip: rotate simulator (⌘← or ⌘→), if Pixel Accurate is disabled. It will be enabled in landscape.
-
Krunal over 6 years@Borzh - Nice - You are welcomed to edit and add your input to this answer
-
kuhr over 6 yearsAwesome - your tip about rotating the device while taking the screenshot and the rotating it back in Preview made the resolution fit for Itunes Connect 5,5'' display upload
-
Faizan Mubasher over 6 yearsWith Xcode 9 - Simulator, you can pick & drag any corner of simulator to resize it and set according to your requirement. That's it
-
green0range about 6 yearsThank you for Optimize Rendering for Window Scale tip. I was able to get screenshot for submissions easily this way.