Skip to content

Commit

Permalink
minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
fabOnReact committed May 30, 2023
1 parent 613bf0a commit a5ac3c3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ - (CGRect)textRectForBounds:(CGRect)bounds
UIEdgeInsets borderAndPaddingInsets = UIEdgeInsetsMake(_textContainerInset.top, leftPadding, _textContainerInset.bottom, rightPadding);
// 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 updatedBounds = self.fragmentViewContainerBounds.size.height > 0 ? self.fragmentViewContainerBounds : bounds;
return UIEdgeInsetsInsetRect([super textRectForBounds:updatedBounds], borderAndPaddingInsets);
}

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

0 comments on commit a5ac3c3

Please sign in to comment.