Pregunta

Tengo un UISearchDisplayController que muestra algunas células después de que un usuario haya buscado. Después el usuario hace clic en la celda, estoy empujando una nueva vista a mi pila de navegación. ¿Cómo puedo eliminar searchResultsTableView desde el punto de vista de modo que cuando el usuario vuelve, él no ve la searchResultsTableView?

¿Fue útil?

Solución

Consulte la documentación de UISearchDisplayController 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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top