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


I want to create an app that shows blank tableview then users can write a text on the search bar and when they search button If you click on the tableview will be written with array objects created.

I have seen this tutorial:, but I need to search when users click the search button How can I do this? What methods do I have to use?

I have tried this method, but it does not work.

  - (zero) Searchbar search button clicked: (UISearchBar *) Searchbar {NSInteger nVideos = [appDelegate.allVideos count]; NSLog (@ "Number of Video:% i", nVideos);  

Do you update your datasource that is associated with tableView? As far as I can see, once the user clicks on the search button with some buttons on the search, you should update your orrate which is related to the table view and it is reloaded.


Comments