Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-01-2009, 09:29 PM   #2 (permalink)
Bovn
Tutorial Author
 
Join Date: Jun 2009
Posts: 25
Default

If you have all the countries in a NSDictionary, you could just display them all in an UITableView. Then bind your class to the outlet of an UITextField and make the class use the UITextFieldDelegate protocol, this way you could use the function textFieldDidBeginEditing: to get the string the user is typing. Then it's just a matter of searching through the NSDictionary with countries and at the end update the UITableView. This will not generate autocomplete functionality, but the only way I know how to do that without seriously subclassing views is to use a UISearchBar.

And of course the class should also use the UITableViewDelegate protocol so that you can get notification when the user has clicked on a cell, in this case a country.

Last edited by Bovn; 07-01-2009 at 09:33 PM.
Bovn is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,849
Threads: 89,215
Posts: 380,664
Top Poster: BrianSlick (7,129)
Welcome to our newest member, joeceastham
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:43 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.