Как удалить searchResultsTableView? - PullRequest
0 голосов
/ 13 августа 2010

У меня есть UISearchDisplayController, который отображает некоторые ячейки после того, как пользователь выполнил поиск.После того, как пользователь нажимает на ячейку, я добавляю новый вид в мой стек навигации.Как я могу удалить searchResultsTableView из представления, чтобы при возврате пользователь не видел searchResultsTableView?

1 Ответ

2 голосов
/ 13 августа 2010

См. Документацию 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
...