button width not honored
jameshays opened this issue · 0 comments
jameshays commented
If setPadding or setEdgeInsets are called after the buttonWidth is set, the button is resized with sizeToFit.
This is the code I used to work around it.
`-(void)setPadding:(CGFloat)padding {
self.contentEdgeInsets = UIEdgeInsetsMake(0, padding, 0, padding);
[self setButtonWidth:self.buttonWidth];
}
-(void) setEdgeInsets:(UIEdgeInsets)insets
{
self.contentEdgeInsets = insets;
[self setButtonWidth:self.buttonWidth];
}
`