Cursor is blinking in UITextField but keyboard doe

2019-07-04 20:58发布

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: enter image description here

Here is my master view design :

enter image description here

1条回答
贪生不怕死
2楼-- · 2019-07-04 21:49

Does calling reloadInputViews help?

查看更多
登录 后发表回答