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
The way to do this in code is:
[button sizeToFit];
If you are subclassing and want to add extra rules you can override:
- (CGSize)sizeThatFits:(CGSize)size;