Cursor is blinking in UITextField but keyboard doe

2019-07-04 21:37发布

问题:

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?