Skip to content

Commit

Permalink
Fix text field not always adjusting size for error label
Browse files Browse the repository at this point in the history
The first time the error was shown on some text fields, the field didn't adjust its height to fit the error text.
  • Loading branch information
stephsharp committed Jul 15, 2018
1 parent 448d787 commit 383be4f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions MaterialTextField/MFTextField.m
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ - (void)setupErrorConstraints
{
self.errorLabelTopConstraint = [self.errorLabel.topAnchor constraintEqualToAnchor:self.topAnchor
constant:[self topPaddingForErrorLabelHidden:!self.hasError]];
NSLayoutConstraint *bottom = [self.errorLabel.bottomAnchor constraintGreaterThanOrEqualToAnchor:self.bottomAnchor];
bottom.priority = 900;

NSLayoutConstraint *bottom = [self.errorLabel.bottomAnchor constraintEqualToAnchor:self.bottomAnchor];
NSLayoutConstraint *leading = [self.errorLabel.leadingAnchor constraintEqualToAnchor:self.leadingAnchor
constant:self.errorPadding.width];
NSLayoutConstraint *trailing = [self.trailingAnchor constraintGreaterThanOrEqualToAnchor:self.errorLabel.trailingAnchor
Expand Down

0 comments on commit 383be4f

Please sign in to comment.