What's the difference between a UITextField
's rectangle for its text vs. editable text?
I just want to move where the text is displayed inside the text field. Should I just override both methods with the same exact implementation?
Returns the drawing rectangle for the text field’s text.
Returns the rectangle in which editable text can be displayed.
textRectForBounds:
lets you set the rectangle for the text when the text field is not being edited.
editingRectForBounds:
lets you set the rectangle for the text when the text field is being edited.
So, yes, you should implement both with the same exact implementation unless you want the text to jump when you begin & end editing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With