2

There is a weird bug where I switch to a screen in my app. This causes the first textfield to become first responder and the cursor is inside the textfield. Then type some text into the field and switch focus to the next textfield, this causes the text in the first box to bounce up and come back down. This happens only on the first time of coming to the screen in question. In order to replicate I need to back out of the screen and go back to it. Any ideas what would cause the text to bounce when focus is lost for the first time? Why would text field text bounce in general?

lufthansa747
  • 1,923
  • 3
  • 26
  • 39
  • Have you used autoLayout? It can be because of autoLayout issue – Ajay Kumar Jan 13 '16 at 18:26
  • i never see a textfield text bounce. It may go up when new line starts, and wjen there is no character in the new line, the textfiled text comes back to its position. Is this what you mean by bouncing ? – Teja Nandamuri Jan 13 '16 at 18:26
  • Yes by bouncing i mean it goes up and comes back to its original position. Yes using autoLayout, what issues could autoLayout cause? – lufthansa747 Jan 13 '16 at 18:29

1 Answers1

3

adding

[textField layoutIfNeeded];

to start of textFieldDidEndEditing: fixed the issue. Any ideas why?

lufthansa747
  • 1,923
  • 3
  • 26
  • 39