iOS drop down view [closed]

2019-02-05 09:48发布

问题:

I have been searching for drop down view (expand & collapse view) that basically expand when user clicked on it or collapse.

The drop down is basically use to include textview/textfield. Till now I could not manage to find how to create this drop down view. What I managed to find is drop down menu which is sort of like an option picker that allows you to select an option. I just wanted to include text only. Is it possible to ask for some pointers regarding this?

Thanks.

回答1:

I also needed a HTML select-like control (single-selection dropdown list) without breaking the XCode legacy GUI interface across past and future iOS releases.

I ended up coding DownPicker, a lightweight control which does just that combining UITextField and UIPickerView. It can be used either as custom control (UIDownPicker) or also as control wrapper, upgrading any existing UITextField.

Here's how it looks like:

For more info and download you can check this brief tutorial or the GitHub project page (both wrote by me - the project is open-source).



回答2:

Yes. There is no dropdown component available in ios. And its really frustrating to build a basic component. However, VPPDropDown is there to solve your problem. https://github.com/vicpenap/VPPDropDown



回答3:

There is no dropdown available in iOS. You should create it with text field and tableview. Use below links for references:

iOS-Examples--UITableView-Combo-Box

a-simple-drop-down-list-for-iphone



回答4:

you can see this one too. This library is written with Swift 3

https://github.com/younatics/YNDropDownMenu



回答5:

http://gabriel-tips.blogspot.in/2011/10/uitableview-display-and-hide-cells-as.html you can take it as reference, table view is good and efficient way for dropdown. if you got any other way then please let me know..



回答6:

Adding more options here. People looking for dropdown in iOS can also give VSDropdown a try:

VSDropdown

It automatically controls many stuffs like frame, direction, appearance and dismissal when tapped outside bounds.