In interface builder, holding Command + = will resize a button to fit its text. I was wondering if this was possible to do programmatically before the
In Xcode 4.5 and above, this can now be done by using 'Auto-layouting / Constraints'.
Major advantages are that:
A few disadvantages:
Coolest thing is we get to focus on declaring an intent such as:
Here is a simple tutorial to get introduced to auto-layouting.
For a more details.
It takes some time at first, but it sure looks like it will be well worth the effort.