Creating a drop down list
I want to make 开发者_StackOverflow社区a drop-down list from scratch. Can anyone please tell me how to do so?
You would start with a UITextField and a button to look like a normal closed drop down list. Then when the button is clicked I would add a new view containing a small UITableView for the drop down part. It shouldn't be too hard. However I'd reconsider the need for a drop down box. Its just not something that you have room on screen for, and the UIPickerView is better suited IMHO. Now on the iPad they use a drop down similar to what I described above but it has enough room on the screen to make this practical.
You can use a UIPickerView or a UITableView to have a functionality akin to drop down lists.
精彩评论