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?) -> PickerView
Parameters
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?) -> PickerView
Parameters
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?) -> PickerView
Parameters
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?) -> PickerView
Parameters
toolBarTitle
工具栏标题
defaultSelectedValues
默认选中值
cancelAction
取消回调
doneAction
完成回调
type
显示样式类型
Return Value
PickerView
-
时间选择器
Declaration
Swift
public class func datePicker(_ toolBarTitle: String, datePickerSetting: DatePickerSetting, cancelAction: BtnAction?, doneAction: DateDoneAction?) -> PickerView
Parameters
toolBarTitle
工具栏标题
datePickerSetting
date配置
cancelAction
取消回调
doneAction
完成回调
Return Value
PickerView