I want to make a stretchable button with rounded corners that don’t skew. Currently I’m doing it programatically like so:
[self.myButton setImage:[[UIImage imageNamed:@"my-button"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 4, 0, 4)] forState:UIControlStateNormal];
Is there any way to do this in IB and save me having to create outlets for all my buttons and littering my viewDidLoad method with calls like the above?
No. There isn’t currently a way to achieve that.
You can however subclass UIButton and override
drawRect: