光标在UITextField中闪烁,但未出现键盘 [英] Cursor is blinking in UITextField but keyboard doesn't appear
本文介绍了光标在UITextField中闪烁,但未出现键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有文本字段的简单详细视图. 在详细的viewController中,我编写了以下代码:
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]);
}
当我将详细信息推送到导航控制器中时,我在日志中看到"是textField第一响应者0 ". 键盘没有出现. 但是文本字段的光标闪烁.
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.
此刻会发生什么?为什么键盘没有出现?我确实尝试在AppDelegate中捕获通知"KeyboardDidShown",但未捕获任何内容:
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:
这是我的主视图设计:
推荐答案
调用reloadInputViews
帮助吗?
这篇关于光标在UITextField中闪烁,但未出现键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文