如何删除searchResultsTableView?

发布于 2024-09-14 04:44:18 字数 147 浏览 7 评论 0原文

我有一个 UISearchDisplayController,它在用户搜索后显示一些单元格。用户单击单元格后,我将一个新视图推送到我的导航堆栈。如何从视图中删除 searchResultsTableView ,以便用户返回时看不到 searchResultsTableView ?

I have a UISearchDisplayController that displays some cells after a user has searched. After the user clicks on the cell, I am pushing a new view to my nav stack. How can I remove searchResultsTableView from the view so that when the user goes back, he doesn't see the searchResultsTableView?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

云淡风轻 2024-09-21 04:44:18

请参阅 UISearchDisplayController 的文档,它说:

setActive:animated:
Displays or hides the search interface, optionally with animation.

- (void)setActive:(BOOL)visible animated:(BOOL)animated


Parameters
visible
YES to display the search interface if it is not already displayed; NO to hide the search interface if it is currently displayed.

animated;
YES to use animation for a change in visible state, otherwise NO.


Discussion
When the user focus in the search field of a managed search bar, the search display controller automatically displays the search interface. You can use this method to force the search interface to appear.

Availability
Available in iPhone OS 3.0 and later.
Declared In
UISearchDisplayController.h

See the documentation of UISearchDisplayController it sais:

setActive:animated:
Displays or hides the search interface, optionally with animation.

- (void)setActive:(BOOL)visible animated:(BOOL)animated


Parameters
visible
YES to display the search interface if it is not already displayed; NO to hide the search interface if it is currently displayed.

animated;
YES to use animation for a change in visible state, otherwise NO.


Discussion
When the user focus in the search field of a managed search bar, the search display controller automatically displays the search interface. You can use this method to force the search interface to appear.

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