Xcode 5.x+ (including 6.x and 7.x)
From Xcode 5 and beyond, there's a even easier solution. Inside the UIStoryboard
, you can simply select your UIViewController
and go directly to the fifth tab. Just change the Simulated Size
from Fixed to Freeform . After that, you should see the Width and Height fields, as the image below:
Xcode 4.x (still valid for newer ones)
Select your view controller, and in the fourth tab of InterfaceBuilder, select 'freeform' in size.
After freeform is selected, you now are able to change the size of the main view inside your UIViewController
. Just select the main view of the controller and change its frame in the fifth tab, like this:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…