0
我想構建一個顯示空tableview的應用程序。然後用戶可以在搜索欄上編寫文本,當他們點擊搜索按鈕時,tableview將被寫入創建的數組項。搜索欄搜索數組項並將它們顯示在tableview上?
我已經看到這個教程:link text,但我只需要在用戶單擊SearchButton時進行搜索。我怎樣才能做到這一點?我必須使用哪些方法?
我試過這種方法,但它不起作用。
- (void) searchBarSearchButtonClicked:(UISearchBar *)theSearchBar {
NSInteger nVideos = [appDelegate.allVideos count];
NSLog(@"number of videos: %i", nVideos);