InputPickerView
示例
要运行示例项目,首先克隆仓库,然后从示例目录运行pod install
。
在您的自定义模型中,“showedStr”是 pickerView 显示的字符串。
import InputPickerView
class CategoryModel: Codable,InputPickerData {
func showedStr() -> String {
return category
}
var category:String
var categoryKey:String
}
使用 InputPickerView
lazy var pickerView = InputPickerView<CategoryModel>()
pickerView.setupData(dataSource) { (row, selectStr, selectModel) in
}
myField.inputView = pickerView
安装
InputPickerView可通过CocoaPods获取。要安装它,只需将以下行添加到Podfile中。
pod 'InputPickerView'
作者
Junyi1227,[email protected]
许可证
InputPickerView在MIT许可证下可用。有关更多信息,请参阅LICENSE文件。