Adding a combo box or drop-down list to UIView

2019-01-26 19:04发布

问题:

I need to add a combo box or drop-down list to a UIView. I did not find such an object in the "Library" of the interface builder. How do I add this object to my UIVIEW? Do I have to inherit it from another object (which one?) or do I have to create it from scratch programmatically? Please help !!!

回答1:

The standard practice here is to either use a UIPicker or push a TableViewController to the stack and return once the user has selected an option here.



回答2:

Youll prolly want to use the UIPicker class as there is no DropDown in UIKit, you can always make your own dropdown list if you desire