I have seen a WWDC 2014 video (What's new in Interface Builder) where the presenter uses Storyboard and changes the height of a table view cell prototype within a table view controller (at around 7m30s). I see all the subviews of that cell resize as he drags the height-handle on the cell. This is great, because now you can see how your layout constraints behave in different scenarios very quickly.
He doesn't explain how he does it. Because when I drag the height-handle of a table view cell prototype, the frames of all my subviews don't update. They only update when I select from the menu: Editor > Resolve Auto Layout Issues > Update Frames (All Views in Table View Controller)
Is there an Xcode setting anywhere that toggles live-updating the view frames I see in Storyboard, obeying the layout constraints?
Create a new Xcode project. Select Single view app and name it AutoLayout. Leave the defaults unchecked: Use core data.
Auto Layout defines margins for each view. These margins describe the preferred spacing between the edge of the view and its subviews. You can access the view's margins using either the layoutMargins or layoutMarginsGuide property. The layoutMargins property lets you get and set the margins as a UIEdgeInsets structure.
In theory, you should be able to turn on “Descendants” in the “Resizing Behavior” popup menu (lower-right corner of the storyboard editor).
In practice, it's broken in your case. I have the same problem. You can report the bug at http://bugreport.apple.com/.
Possibly it works better in Yosemite. I'm still running Mavericks.
Update: On XCode 8 Beta 5 I tested and found XIB where I needed to manually update Frame now automatically updates when I resize freeform view.
On XCode 7.3.1: This is not solution but I find a good compromise.
Go to XCode -> Preferences -> Key Bindings -> Search for "Update Frames". Remove existing shortcuts for the first item (which does not seem to work) and replace the shortcut to CTRL+OPTION+COMMAND+P for the second item. The shortcut is an example, you can add whatever shortcut you want that does not conflict with existing bindings).
Now each time you resize you can quickly use the shortcut to update the frame.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With