PickerView
@objcMembers
public class PickerView : UIView
extension PickerView: UIPickerViewDelegate, UIPickerViewDataSource
Undocumented
-
完成按钮回调
Declaration
Swift
public typealias BtnAction = () -> Void -
单选完成按钮回调
Declaration
Swift
public typealias SingleDoneAction = (_ selectedIndex: Int, _ selectedValue: String) -> Void -
多选完成按钮回调
Declaration
Swift
public typealias MultipleDoneAction = (_ selectedIndexs: [Int], _ selectedValues: [String]) -> Void -
日期完成按钮回调
Declaration
Swift
public typealias DateDoneAction = (_ selectedDate: Date) -> Void -
多选联动完成按钮回调
Declaration
Swift
public typealias MultipleAssociatedDataType = [[[String : [String]?]]]
-
Undocumented
Declaration
Swift
public init(pickerStyle: PickerStyles) -
Undocumented
Declaration
Swift
override public func layoutSubviews()
-
Undocumented
Declaration
Swift
final public func numberOfComponents(in pickerView: UIPickerView) -> Int -
Undocumented
Declaration
Swift
final public func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int -
Undocumented
Declaration
Swift
final public func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) -
Undocumented
Declaration
Swift
final public func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView
-
单列
Declaration
Swift
public class func singleColPicker(_ toolBarTitle: String, singleColData: [String], defaultIndex: Int?, cancelAction: BtnAction?, sureAction: SingleDoneAction?) -> PickerViewParameters
toolBarTitle工具栏标题
singleColData数据源 ~> [String]
defaultIndex默认选中索引
cancelAction取消回调
sureAction完成回调
Return Value
PickerView
-
多列不关联
Declaration
Swift
public class func multipleCosPicker(_ toolBarTitle: String, multipleColsData: [[String]], defaultSelectedIndexs: [Int]?, cancelAction: BtnAction?, doneAction: MultipleDoneAction?) -> PickerViewParameters
toolBarTitle工具栏标题
multipleColsData数据源 ~> [[String]]
defaultSelectedIndexs默认选中索引
cancelAction取消回调
doneAction完成回调
Return Value
PickerView
-
multipleAssociatedCosPicker(_:multipleAssociatedColsData:defaultSelectedValues:cancelAction:doneAction:)多列关联
Declaration
Swift
public class func multipleAssociatedCosPicker(_ toolBarTitle: String, multipleAssociatedColsData: MultipleAssociatedDataType, defaultSelectedValues: [String]?, cancelAction: BtnAction?, doneAction: MultipleDoneAction?) -> PickerViewParameters
toolBarTitle工具栏标题
multipleAssociatedColsData数据源 ~> [[[String: [String]?]]]
defaultSelectedValues默认选中值 ~> [String]?
cancelAction取消回调
doneAction完成回调
Return Value
PickerView
-
城市选择器
Declaration
Swift
public class func citiesPicker(_ toolBarTitle: String, type: CityPickStyle, defaultSelectedValues: [String]?, cancelAction: BtnAction?, doneAction: MultipleDoneAction?) -> PickerViewParameters
toolBarTitle工具栏标题
defaultSelectedValues默认选中值
cancelAction取消回调
doneAction完成回调
type显示样式类型
Return Value
PickerView
-
时间选择器
Declaration
Swift
public class func datePicker(_ toolBarTitle: String, datePickerSetting: DatePickerSetting, cancelAction: BtnAction?, doneAction: DateDoneAction?) -> PickerViewParameters
toolBarTitle工具栏标题
datePickerSettingdate配置
cancelAction取消回调
doneAction完成回调
Return Value
PickerView
View on GitHub
PickerView Class Reference