becomeFirstResponder not working in iOS 8

前端 未结 8 777
不知归路
不知归路 2020-12-09 03:55

I am using UITextField\'s method becomeFirstResponder to show the keyboard. This is working in iOS 7. But in iOS 8 this method doesn\'t show the keyboard.

 U         


        
8条回答
  •  借酒劲吻你
    2020-12-09 04:17

    Just in case others have the same issue as me:

    I had an IBOutlet connected to my UITextField. Erroneously I was initializing this in my viewDidLoad method. That is, [[textField alloc] init];. I removed this and everything worked again.

提交回复
热议问题