DataPicker
public final class DataPicker : RootView
extension DataPicker: UIPickerViewDelegate
extension DataPicker: UIPickerViewDataSource
DataPicker selects a single value from a set of values.
Version
1.5.0Date
22/05/2019-
The delegate of the DataPicker.
Declaration
Swift
public weak var delegate: DataPickerDelegate? -
The title of the picker view.
Declaration
Swift
public var title: String? { get set } -
The background color of the title.
Declaration
Swift
public var titleBackgroundColor: UIColor? { get set } -
The column list, which is a list of column name and item tuple. Value is the value for each selection. Name is the name of the value which will be displayed on the screen.
Declaration
Swift
public private(set) var columns: [DataPickerColumn] { get set } -
The view that is used to control the picker.
Declaration
Swift
public var trigger: UIView? { get set } -
Set the DataPicker with a single column.
Declaration
Swift
public func set(_ items: [DataPickerItem])Parameters
itemsThe item list.
-
Set the DataPicker with columns.
Declaration
Swift
public func set(_ columns: [DataPickerColumn])Parameters
columnsThe column list.
-
Select an item.
Declaration
Swift
public func selectValue(_ value: String, atColumn index: Int = 0)Parameters
valueThe value to be selected.
indexThe index of the column.
-
Declaration
Swift
@objc public override func hide() -
Declaration
Swift
public override func show() -
Declaration
Swift
public override func initialize() -
Declaration
Swift
public override func render() -
Undocumented
Declaration
Swift
public func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView -
Undocumented
Declaration
Swift
public func numberOfComponents(in pickerView: UIPickerView) -> Int -
Undocumented
Declaration
Swift
public func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int
DataPicker Class Reference