IOS8 Text in TextField Bounces on Focus

我的未来我决定 提交于 2019-12-12 18:33:06

问题


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?


回答1:


adding

[textField layoutIfNeeded];

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



来源:https://stackoverflow.com/questions/34774212/ios8-text-in-textfield-bounces-on-focus

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!