Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't resize UIView in IB

I think that you cannot edit the size while simulating any user interface elements such as the status bar in Interface Builder. You could try turning the simulated elements off if any are enabled. Not exactly sure why this is, so would appreciate feedback from anyone who knows why exactly this is - there must be a good reason.


In order to achieve that in XCode 4.6.3/5.0.2 you need to follow the screenshot below:

  1. Under 'File Inspector' -> untick Use Auto Layout
  2. Click on Attributes Selector & Choose Freeform for Size

This is needed when creating a headerView for a tableView

enter image description here


The part that you are looking for is on the first Inspector panel (Command-1). Right at the top there is a section that is labeled Simulated User Interface Elements. By default the Status Bar is on. You need to make sure all three are set to None.


As at Xcode 4.2, iOS 5.0.1, the default simulated metrics include simulating the 'size' attribute of UIViewControllers to 'Inferred'

If you change this attribute to 'Freeform' then you are able to resize the UIView contained within the UIViewController while also simulating the status bar (or any other of the simulations for that matter)