Skip to content

Commit

Permalink
Updates MDCMultilineTextField's bottom textfield constraint to use th…
Browse files Browse the repository at this point in the history
…e textInsets as the constant.

This brings parallels the calculation done in sizeThatFits and will ensure the set textInsets are always adhered to.

PiperOrigin-RevId: 318268981
  • Loading branch information
Nobody authored and material-automation committed Jun 25, 2020
1 parent 55a51fa commit e214be3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/TextFields/src/MDCMultilineTextField.m
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,11 @@ - (void)updateConstraints {
toItem:self
attribute:NSLayoutAttributeBottom
multiplier:1
constant:-1 * MDCTextInputHalfPadding];
constant:-1 * self.textInsets.bottom];
self.textViewBottomSuperviewBottom.priority = UILayoutPriorityDefaultLow;
self.textViewBottomSuperviewBottom.active = YES;
}
self.textViewBottomSuperviewBottom.constant = -1 * self.textInsets.bottom;

if (!self.textViewTop) {
self.textViewTop = [NSLayoutConstraint constraintWithItem:self.textView
Expand Down

0 comments on commit e214be3

Please sign in to comment.