hi i have the next problem.. i need put in mi aplication an controller combox or downdrill or textfield for what user select a choice names the countrys.. the uipicker not works for me beacuse its very bigger.. so i need a combox or textfield whit autocomplete but only names to countrys.. any can help me? i make this i iphone?
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.
but the problem i what i can show the tableview whit the countrys.. because the work area for the control for countrys its small...
iphone dont manage control combox?
There's no direct support for a control like a combo box; the screen is already small, so popping up a tiny scrolling list of items to choose from is likely to take up most of the screen anyway.
Look at how combo boxes are handled in Safari: when you tap on the combo box on a web page, a picker control pops up. You could take the same approach, or perhaps tapping on that small country field could take the user to a table view where the country could be selected, like Bovn suggests.
I would just hide a UITableView with all the countries. And when the user clicks on a button to choose a country, you simply display that view. Let's face it; the values are mostly known by the user in advance; if he or she is supposed to choose his/her country, it's only a matter of scrolling down to it. Order them all by name only and you should be fine. Index the table aswell. There is not that many countries in the world to make it neccessary for an autocomplete.
All the interfaces on the web that requires the user to specify their country has a list of them in a select box. People just scroll down fast untill the first letter starts to close up on the first letter of their country.
So take the simple route on this one; the user will expect it and probably only become confused if their suddenly introduced to an autocomplete functionality.