Search Function in iPhone Apps

Discussion in 'iOS Programming' started by matthew858, Jun 1, 2008.

  1. macrumors member

    Apr 15, 2008
    Sydney, Australia
    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.
  2. macrumors 65816


    Jun 3, 2007
    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
  3. macrumors 65816

    Jun 2, 2007
    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 :(]
  4. macrumors 68030


    Sep 2, 2008
    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.

Share This Page