Reputation: 871
I was messing with the instruments panel on my application. The 4 inch retina simulator was working fine and used to look exactly like the iPhone 5:
However, when I was messing with the automation, 4 inch retina simulator changed and now looks pretty much like a very long iPad:
(sorry for the very big image but this is the actual size of it now).
And now whenever I want to bring up the simulator, it continues to look like this one above. I am sure that there is an easy fix to this and that is why I ask because I honestly don't want to have to re install Xcode 4.5
Thanks!
Upvotes: 16
Views: 6936
Reputation: 1928
Actually I think there may be a bug in the simulator code or in the interface builder or somewhere...
I have two storyboards (iphone/ipad) and a nib for a table cell. My simulated display looked completely as expected until I changed some autoresizing values in the nib. Then suddenly, the simulator started showing the giant/ipad like view for the iPhone Retina 3.5 display. Also when I re-oriented the hardware in the simulator, it actually showed the entire device landscape. A little while later I changed a table in my storyboard from grouped to plain and then the simulator looked fine again. I just changed some autoresizing values again and it is back to the giant iPhone.
I wonder if it is related to auto-resizing/auto-layout. On my nibs, I have auto-layout turned off, but I on my storyboard it is turned on.
Upvotes: 0
Reputation: 35823
The reason this changed is that your upgrade to XCode 5 brought with it the iOS7 Simulator and dropped the older emulator you were using.
DrummerB's answer above will rein in the size of the simulator, but it won't bring back the black bezel and your app won't look the same. To see what you were seeing before, do this:
At the top left of the XCode window you will see the project (or "target") name and the selected simulator. Like "MyProgram > iPhone Retina (4-inch)". Click on "iPhone Retina..."
A droplist will appear with the title "iOS Device" at the top. At the bottom you will see "More Simulators...". Click that option.
This brings up the preferences dialog on the "Download" page where you can install extra components in XCode. Select "iOS 6.1 Simulator" and it will start to download. It's about half a gig, so it will take some time.
When it finishes it will throw a dialog asking you to restart XCode - go ahead.
Now back in XCode, go to the iOS Device choice again, and this time select one of the "iOS 6" options.
You'll get back what you had before - the black iPhone-4ish device.
(If you followed DrummerB's advice above, it might look tiny now, so go to Window->Scale in the iOS Simulator and select 100%)
Also note, that you probably want to use the iOS7 simulator at some point too, since is showing you what your app will look like on a lot of users' iPhones.
Upvotes: 0
Reputation: 40201
When the Simulator is active, go to Window > Size > 50%.
You can also change the size by using ⌘+1, ⌘+2 or ⌘+3
EDIT:
When you're using a retina MBP, the Simulator will take advantage of that and go into retina mode as well, which will be the same size as the regular Simulator (just like with the real devices). Since it's the same size it can use the slightly bigger border and look like the actual device, instead of using the thin iPad-like border.
On a "normal resolution" display, only the non-retina iPhone simulator will use the iPhone border.
Upvotes: 31