25

I have the latest version of Xcode. In one of my projects I noticed that the views for the iPhone were the new iPhone 5 screen sizes. I like it but is there a way to switch back to the smaller screen size? Not everyone has the iPhone 5.

zpasternack
  • 17,838
  • 2
  • 63
  • 81
flyers
  • 514
  • 2
  • 5
  • 16

4 Answers4

56

Also, when your building your interface, you'll see a small icon that lets you quickly switch between 4" and 3.5" screens. It's the rectangular icon on the left. It toggles back and forth between phone sizes.

The icon on the left lets you switch display sizes

Dan Morrow
  • 4,433
  • 2
  • 31
  • 45
  • 1
    Marrow - any idea if one person is on XCode 4.2, how to fix this issue? Actually in our team, people are using different versions of XCode and ios and in XCode 4.2, and it dont have this option. How to fix this? – itsaboutcode Jan 17 '13 at 07:48
  • 3
    You may not be able be able to do this. Not sure that Xcode 4.2 even knows about the iPhone 5. – Dan Morrow Jan 17 '13 at 14:17
  • Yes, that icon switches between the two modes, but why does it not switch automatically when changing simulators? Doesn't that mean whatever mode you compile it at, it will be stuck at that size no matter what iPhone is being used? – Timothy Swan Aug 30 '14 at 14:55
  • @TimothySwan - This icon is there only to show you what your interface will look like in the two different sizes. Your interface is not "stuck" at this size. Your interface is *both* of these sizes. – Dan Morrow Sep 02 '14 at 15:08
  • This option is nowhere to be found in Xcode 6, after introducing two new sizes. SPA's answer below will give all options though. To change all views at once, use William's answer. – Sti Oct 22 '14 at 20:50
21

There's a size property in the attributes, so you can choose the pre iPhone5 size of 3.5

enter image description here

SPA
  • 1,279
  • 8
  • 13
4

Update: It's now under Editor->Simulated Screen. It's combined with orientation (portrait vs. landscape).

William T. Mallard
  • 1,562
  • 2
  • 25
  • 33
1

You can switch between the Form Factors(IPhone 5 and the previous versions) by clicking on Editor->Apply Form Factor

Vishal Shah
  • 1,069
  • 1
  • 10
  • 11