zhuber
zhuber

Reputation: 5534

SearchBar for iPhone

I would like to implement UISearchBar in my app. My app consists of a view with a text in the middle, and by swiping left or right you get the same view but with another text.

My goal is to add UISearchBar that searches threw array of messages and then shows the results in tableview (that will appear after you start searching, I have no tableview right now in my app).

Any suggestions ??!!!

Upvotes: 0

Views: 297

Answers (2)

Harjot Singh
Harjot Singh

Reputation: 6927

You can do one thing, for searching from the list of Array you can use NSPredicate class to get the searched object form array list.

And then use the same Array as datasource for the UITableView. And reload its content.

Upvotes: 0

Bonnie
Bonnie

Reputation: 4953

use a UISearchDisplayController
have a look at these tutorials Link1 and Link2

Upvotes: 1

Related Questions