Cursor is blinking in UITextField but keyboard doesn't appear

戏子无情 提交于 2019-12-10 19:17:42

问题


I got a simple detail view with a textfield. In detail's viewController I wrote this code:

- (void) viewDidAppear:(BOOL)animated{
    [self.textField becomeFirstResponder];
    NSLog(@"is textField 1st responder %d", [self.textField isFirstResponder]);
}

When I push the detail into a navigation controller, I see "is textField 1st responder 0" in my log. The keyboard doesn't appear. But the textfield has blinking cursor.

What happens in this moment? Why the keyboard doesn't appears? I did try to catch a notification "KeyboardDidShown" in my AppDelegate but didn't catch anything:

Here is my master view design :


回答1:


Does calling reloadInputViews help?



来源:https://stackoverflow.com/questions/13960410/cursor-is-blinking-in-uitextfield-but-keyboard-doesnt-appear

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