I'm having a weird issue here. Textfield’s bounds change when textfield becomes firstResponder and rolls back when resigns.
In other words, when I tap on the textfield to change the text, text jumps down.
I'm using system font with size 16. I have two different UITextField
s, one with border and one without border but same happens to both of them.
Any ideas why this is happening and how to fix it ?
Update
So after testing for a few days, I realized that this issue only happens on iOS 10
Based on my experience this is an iOS 10 bug and the only way to resolve in my case was to make the height of my UITextField
to equal the text height (based on font type, you need different relations between font size and UITextField
height).
For example if the height of the UITextField
is 30 points the system font size must be 20.
Hope it works for you too.
I got the same problem. (Spent more than 1 day for this issue).
In my case, the solution is that turn off automaticallyAdjustsScrollViewInsets
of UIViewController
.
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