Skip to content

Commit

Permalink
changes requested in code review
Browse files Browse the repository at this point in the history
  • Loading branch information
fabOnReact committed May 30, 2023
1 parent 12b51dd commit 613bf0a
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,9 @@ - (CGRect)textRectForBounds:(CGRect)bounds
CGFloat leftPadding = _textContainerInset.left + _textBorderInsets.left;
CGFloat rightPadding = _textContainerInset.right + _textBorderInsets.right;
UIEdgeInsets borderAndPaddingInsets = UIEdgeInsetsMake(_textContainerInset.top, leftPadding, _textContainerInset.bottom, rightPadding);
if (self.fragmentViewContainerBounds.size.height > 0) {
// Apply custom bounds to fix iOS UITextField issue with lineHeight.
// Sets the correct y coordinates for _UITextLayoutFragmentView.
return UIEdgeInsetsInsetRect([super textRectForBounds:self.fragmentViewContainerBounds], borderAndPaddingInsets);
} else {
return UIEdgeInsetsInsetRect([super textRectForBounds:bounds], borderAndPaddingInsets);
}
// The fragmentViewContainerBounds set the correct y coordinates for
// _UITextLayoutFragmentView to fix an iOS UITextField issue with lineHeight.
return UIEdgeInsetsInsetRect([super textRectForBounds:self.fragmentViewContainerBounds.size.height > 0 ? self.fragmentViewContainerBounds : bounds], borderAndPaddingInsets);
}

- (CGRect)editingRectForBounds:(CGRect)bounds
Expand Down

0 comments on commit 613bf0a

Please sign in to comment.