I'm using an UITextField
which is wrapping around its values in width
.
The UITextField
has a placeholder, which is of 2 digits. When the text (input from the user) is of 1 digit, the UITextField
is not diminishing its width
to be lower than the space needed for the placeholder to be shown (even when the placeholder is not shown as the user has input on that UITextField
).
The only solution I found so far is to listen to text changes, setting the placeholder
to be equal to ""
when the value
of the input is not empty, and resetting it on the other scenario.
Am I missing something, or is it the expected behaviour and what a user might expect from an input field?