ios - 在textfield中输入文字前三个会闪
黄舟
黄舟 2017-04-17 17:29:07
0
2
441

我的tableview中有3个cell,每个cell中都是textfield现在出现了一个神奇的现象,当点击textfield输入文字时,切换到其他textfield,之前的textfield中的文字会闪一下,&&前三次会出现这样的情况,在之后就正常了,这是为什么呢?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all (2)
大家讲道理

Set a delegate for textfield and try it

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

I referred here

    Peter_Zhu

    Master, I found the reason. The problem occurred here. I wrote this line of code when the keyboard pops up to change the view position.self.view.layoutIfNeeded()
    After deleting this sentence, it will be fine. Thank you, Master

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!