Reputation: 128
I am creating an iPhone app which I would like to have a similar interface to the iPhone's native contact picker view, i.e. an alphabetical list which you can scroll through, with a search bar up top which narrows down the list. Particularly, I'd like to be able to show the letters of the alphabet down the side so that as you scroll through the list, you see your position in the alphabet in the scrollbar. The problem is that my data basically consists of key-value pairs, not contact data, so I can't easily use the native contact picker.
As far as I can see, I have two options to achieve what I want:
Any advice on which is the simplest way? What are the pitfalls (particularly of 1)?
Upvotes: 1
Views: 2059
Reputation: 9073
For a search bar, have a look at TTSearchBar in the Three20 library.
Everything else can be easily implemented using UITableView.
Upvotes: 0
Reputation: 85542
To get the letters down the side, you can just provide a -sectionIndexTitlesForTableView: method in your table view datasource. As for searching, there's a bit more work there, and it's very dependent on your data. A UISearchBar is the place to start, however.
Upvotes: 2