Skip to content

Commit ea395d9

Browse files
author
Stephanie Sharp
committed
Fix crashes on iOS 9
1 parent 993301a commit ea395d9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

MaterialFormKit/MFTextField.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ - (void)showErrorLabelAnimated:(BOOL)animated
530530
[self updateErrorLabelText];
531531

532532
if (animated && !self.errorIsAnimating) {
533-
[self layoutIfNeeded];
533+
[self setNeedsLayout];
534534
self.errorIsAnimating = YES;
535535
self.errorLabelHeightConstraint.active = NO;
536536
self.errorLabelTopConstraint.constant = [self topPaddingForErrorLabelHidden:NO];
@@ -656,7 +656,7 @@ - (CGRect)placeholderRectForBounds:(CGRect)bounds
656656
- (CGRect)clearButtonRectForBounds:(CGRect)bounds
657657
{
658658
CGRect clearButtonRect = [super clearButtonRectForBounds:bounds];
659-
clearButtonRect.origin.y = CGRectGetMidY(self.textRect) - (clearButtonRect.size.height / 2.0f);
659+
clearButtonRect.origin.y = CGRectGetMidY(_textRect) - (clearButtonRect.size.height / 2.0f);
660660

661661
return clearButtonRect;
662662
}

0 commit comments

Comments
 (0)