0

我有一個UISearchDisplayController顯示用戶搜索後的一些單元格。用戶點擊單元格後,我正在嚮導航堆棧推送一個新視圖。如何從視圖中刪除searchResultsTableView,以便當用戶返回時,他看不到searchResultsTableView?如何刪除searchResultsTableView?

回答

2

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