UISeachBar 和键盘出现、消失然后再次出现
我有一个 UISearchBar 可以成为第一响应者。在同一屏幕中,我有一个表格视图,用户可以触摸其行以转到新屏幕。但是,当搜索栏处于活动状态且键盘向上时,如果用户触摸表格行之一以转到新屏幕然后返回,键盘会重新出现、消失,然后最后一次再次出现。有什么想法造成这种情况吗?
I have a UISearchBar which can become first responder. In the same screen I have a tableview whose rows the user can touch to go to a new screen. However, when the search bar is active and the keyboard is up, if the user touches one of the table rows to go to a new screen and then goes back, the keyboard reappears, disappears, and then appears again one last time. Any ideas what's causing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来您在推动后将视图控制器弹出。看看
下一个屏幕的 viewWillAppear/viewDidAppear 方法中是否有这一行
It seems you are popping view controller back after pushing. See if there is this line
you have in viewWillAppear/viewDidAppear method of the next screen