diff --git a/SDCAlertView/Source/SDCAlertViewContentView.m b/SDCAlertView/Source/SDCAlertViewContentView.m index 10adad7b..648bdf54 100644 --- a/SDCAlertView/Source/SDCAlertViewContentView.m +++ b/SDCAlertView/Source/SDCAlertViewContentView.m @@ -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]; }