View Full Version : Search Function in iPhone Apps

Jun 1, 2008, 03:58 AM
Sorry if this has already been answered, but how do you add a search function to an iPhone app. I have made a brilliant app but need to add a search function so people can search for "items" within my app. Like the contacts search in iPhone 2.0.

Jun 1, 2008, 05:06 AM
Err, implement code to search through items?

There's nothing pre-written to generically "search" through some generic items - that would be hard to do such that it covered the greatly differing needs of developers based on the application.

As far as UI goes, though, you can use a UISearchBar. That's about as prewritten as you're gonna get. :p

Jul 28, 2009, 10:14 AM
How would I go about implementing a search function to sift through a large-ish SQL table I have? It's just a load of categories leading to pages with about 7 or 8 blocks of text on them.

[i r noob :(]

Jul 28, 2009, 11:27 AM
Look at the TableSearch example project. There is a new class in 3.0 called UISearchDisplayController that does some spiffy things during searching.

However that example project will mainly show you how to set up the UI. The way that you actually search through your data will be up to you.