I want to build an app that shows a empty tableview. Then users can write a text on a searchbar and when they click on Search button the tableview will be written with array items founded.
I only need to search when user click SearchButton. How can I do this? What methods do I have to use?
I'v开发者_StackOverflow社区e tried with this method, but it doesn't works.
- (void) searchBarSearchButtonClicked:(UISearchBar *)theSearchBar {
NSInteger nVideos = [appDelegate.allVideos count];
NSLog(@"number of videos: %i", nVideos);
Do you update your datasource that associates with tableView? As far as i can see, once user click search button with some search term, you should update your array that relates to tableView and reload it.
精彩评论