开发者

Searchbar to search array items and displays them on a tableview?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜