Adding a combo box or drop-down list to UIView

2019-01-26 18:20发布

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 !!!

2条回答
时光不老,我们不散
2楼-- · 2019-01-26 18:44

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

查看更多
▲ chillily
3楼-- · 2019-01-26 18:50

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.

查看更多
登录 后发表回答