iOS 3.2 上弹出窗口关闭时键盘不会消失
- (BOOL)popoverControllerShouldDismissPopover:(UIPopoverController *)popoverController {
[self dismissFirstResponder];
return YES;
}
-(void)dismissFirstResponder {
[nameField resignFirstResponder];
[descriptionField resignFirstResponder];
[helpField resignFirstResponder];
}
我已经尝试了很多不同的事情,但键盘就是没有按下去:
- 我检查了我的插座是否在 Interface Builder 中正确连接,
- 我在 2 个方法中放置了断点,以检查它们是否在适当的时间被调用,他们确实是。这 3 个文本字段是应用程序中唯一的文本字段。
会发生什么:弹出窗口被关闭,但键盘保持打开状态。
我真的很感激在这个问题上的一些帮助。这可能是 iOS 3.2 上的一个已知错误,如果是这样,我们将非常感激地接受任何解决方法。谢谢
- (BOOL)popoverControllerShouldDismissPopover:(UIPopoverController *)popoverController {
[self dismissFirstResponder];
return YES;
}
-(void)dismissFirstResponder {
[nameField resignFirstResponder];
[descriptionField resignFirstResponder];
[helpField resignFirstResponder];
}
I have tried loads of different things, but the keyboard just isn't going down:
- I checked to see if my outlets were hooked up correctly in Interface Builder
- I put breakpoints inside the 2 methods to check they were being called at the appropriate times, and they were. Those 3 Text Fields are the only ones in the app.
What happens: The popover gets dismissed but the keyboard stays up.
I would really appreciate some help on this matter. It might be a known bug on iOS 3.2, if so any workarounds would be gratefully accepted. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保为 UITextView 和 UITextField 分配了委托
然后调用以下方法从视图中消除任何键盘活动。
Make sure the delegate for UITextView the UITextField is assigned
Then call the following method to dismiss any keyboard activity from the view.