Iphone UISearchBar 取消按钮故障

发布于 2024-09-14 11:04:50 字数 183 浏览 3 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

断舍离 2024-09-21 11:04:50

我明白了 - 我不知道在哪里可以与搜索栏中内置的取消按钮进行交互,但我将清除搜索表的代码放在 -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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文