ASDropDown
截图
示例
import ASDropDown
let items = (0..<100).map({return ASDropDownItem(key: "key_\($0)", title: "item-\($0)")})
ASDropDown.openDropDown(items, nil, { (index: Int, item: String) in
self.textField.text = item
}, anchorpointView, nil)
下拉菜单自定义属性
let items = (0..<100).map({return ASDropDownItem(key: "key_\($0)", title: "item-\($0)")})
ASDropDown.openDropDown(items, ASDropDownProp(UIFont.systemFont(ofSize: 15), UIColor.red), { [unowned self] (index: Int, item: String) in
self.textField.text = item
}, anchorpointView, nil)
需求
安装
ASDropDown可通过CocoaPods获得。要安装它,只需将以下行添加到您的Podfile中。
pod 'ASDropDown'
作者
[email protected],[email protected]
许可
ASDropDown遵循MIT许可。查看LICENSE文件以获取更多信息。