Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resize view in XIB?

It appears that in Xcode 4.5+, just to be annoying: Apple changed this again.

Instead, you now have to:

  1. select the viewcontroler
  2. select the "size" dropdown
  3. set it to "Freeform"

...which removes their "block" on editing the size fields.

(this is pretty close to how I expected it to work in the first place, but I have to say it's not easy to find - you have to edit a different value on a different screen (with no help from Apple), in order to un-break the edit field on the correct screen. Not good design!)


Interface Builder (and the IB equivalent in Xcode 4) won't let you change the size (or autosizing attributes) of a top-level view when any Simulated User Interface Elements are enabled.

Select your view, and in the View Attributes inspector set Status Bar, Top Bar, and Bottom Bar to Unspecified. You should then be able to change the size.


In swift 4.2 interface builder won't let you change the size

click on the view and open the attribute inspector and change top, bottom bar to none and size to freeform. Now you are good to go for the change in size.

enter image description here