MaterialTextField icon indicating copy to clipboard operation
MaterialTextField copied to clipboard

textRectForBounds is wrong with left/rightView

Open pjechris opened this issue 5 years ago • 0 comments

Hi,

textRectForBounds is sometimes wrong when using left/rightView:

  • when viewMode is .never or .whileEditing everything is working as expected
  • when viewMode is .always or .whileEditing, frame is smaller than expected.

It seems coming from the fact that in 1st case UIKit UITextField.textRectForBounds is returning the full frame while in second it returns frame minus left/right frames.

pjechris avatar Mar 22 '19 15:03 pjechris