Skip to content

Commit

Permalink
Fix #58—Enforce contentPadding in label widths
Browse files Browse the repository at this point in the history
  • Loading branch information
sberrevoets committed Oct 14, 2014
1 parent aa6f5d7 commit e346316
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SDCAlertView/Source/SDCAlertViewContentView.m
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,8 @@ - (void)setTextFieldTextColor:(UIColor *)textFieldTextColor {

- (void)setContentPadding:(UIEdgeInsets)contentPadding {
_contentPadding = contentPadding;
self.titleLabel.preferredMaxLayoutWidth = SDCAlertViewWidth - self.contentPadding.left - self.contentPadding.right;
self.messageLabel.preferredMaxLayoutWidth = SDCAlertViewWidth - self.contentPadding.left - self.contentPadding.right;
[self setNeedsUpdateConstraints];
}

Expand Down

0 comments on commit e346316

Please sign in to comment.