Iphone UISearchBar 取消按钮故障
我有一个 UISearchBar 可以成功搜索并显示结果。如果我在搜索过程中按下取消按钮,原始表将被恢复,一切都很好。如果我按下键盘上的搜索按钮,就会显示搜索结果,这很棒。但是,如果我按下搜索栏上的取消按钮(我正在使用“搜索栏和显示控制器”),屏幕将恢复正常,仅留下搜索结果,而不显示原始表格。
有什么想法吗?
谢谢你!
I have a UISearchBar that searches and displays results successfully. If I press the cancel button mid-search, the original table is restored and all is well. If I press the search button that is on the keyboard, the search results are shown, which is great. But THEN if I press the cancel button that is on the search bar (I am using the 'search bar and display controller'), the screen goes back to normal, leaving behind only the search results and not showing the original table.
Any ideas?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我明白了 - 我不知道在哪里可以与搜索栏中内置的取消按钮进行交互,但我将清除搜索表的代码放在 -searchButtonPressed 中,并将其放入搜索下方,完成了它的工作!
I got it - I did not know where I could interact with the cancel button that was built into the search bar but I put code that cleaned out the search table in the -searchButtonPressed and threw that in under the search did its work!