1

Below is a demonstration of how the text in my text field is moving when the text field is active. By applying a background to the field, i found that only the text moves, not the whole text field itself. This is not happening to the text field above as well, only the bottom one

enter image description here

rohaldb
  • 589
  • 7
  • 24

2 Answers2

2

after search for this issue i recommend to change your font to another font. but there is some way to prevent this issue :

you can use this :

 - (void)textFieldDidEndEditing:(UITextField *)textField
{
 [textField layoutIfNeeded]; //Fixes iOS 9 text bounce glitch
  //...other stuff
}

please check this links :

Text in UITextField moves up after editing (center while editing)

UITextField text jumps iOS 9

Community
  • 1
  • 1
Mo Farhand
  • 1,144
  • 8
  • 21
1

Try to change to font to Arial, helped me.

yourTextField.font = UIFont(name: "Arial", size: CGFloat(16))
Rodion
  • 21
  • 2
  • This fixed a similar issue, that caused my text to jitter while I typed in a UITextField. System Font was doing something funny – Rolf Locher May 20 '20 at 23:15