2012-05-23 88 views
0

當我點擊鍵盤顯示UISearchDisplayController上的搜索按鈕它會觸發什麼事件?點擊搜索按鈕觸發什麼事件?

沒有一個事件的觸發

- (void) searchDisplayControllerWillBeginSearch:(UISearchDisplayController *)controller; 
{ 

} 
- (void) searchDisplayControllerDidBeginSearch:(UISearchDisplayController *)controller; 
{ 

} 
- (void) searchDisplayControllerWillEndSearch:(UISearchDisplayController *)controller; 
{ 

} 
- (void) searchDisplayControllerDidEndSearch:(UISearchDisplayController *)controller; 
{ 

} 
// called when the table is created destroyed, shown or hidden. configure as necessary. 
- (void)searchDisplayController:(UISearchDisplayController *)controller didLoadSearchResultsTableView:(UITableView *)tableView; 
{ 

} 
- (void)searchDisplayController:(UISearchDisplayController *)controller willUnloadSearchResultsTableView:(UITableView *)tableView; 
{ 

} 

// called when table is shown/hidden 
- (void)searchDisplayController:(UISearchDisplayController *)controller willShowSearchResultsTableView:(UITableView *)tableView; 
{ 

} 
- (void)searchDisplayController:(UISearchDisplayController *)controller didShowSearchResultsTableView:(UITableView *)tableView; 
{ 

} 
- (void)searchDisplayController:(UISearchDisplayController *)controller willHideSearchResultsTableView:(UITableView *)tableView; 
{ 

} 
- (void)searchDisplayController:(UISearchDisplayController *)controller didHideSearchResultsTableView:(UITableView *)tableView; 
{ 

} 

歡迎任何評論

+2

你就不能滑在的NSLog在每種方法中看到觸發的調用序列? – Bourne

+0

你可以通過在每種方法中設置中斷點來檢查自己。 – saadnib

+0

你是否分配了代表? –

回答

1
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar;      // called when keyboard search button pressed 
{ 


} 

它需要使用的UISearchBar的功能,而不是UISearchDisplayController

相關問題