DownPicker
open class DownPicker : UIControl
extension DownPicker: UIPickerViewDelegate, UIPickerViewDataSource
extension DownPicker: UITextFieldDelegate
DownPicker control which acts on a supplied textfield to present a verticially scrolling caurosel of options.
Built on the UIPickerView
-
Sets the style of the UIToolBar. By default the style is
.defaultDeclaration
Swift
public var toolbarStyle: UIBarStyle -
Determines whether or not a down arrow is shown in the text field.
Declaration
Swift
public var showArrowImage: Bool -
Determinnes whether or not the cancel button should be visible.
Declaration
Swift
public var shouldDisplayCancelButton: Bool -
Text to be assigned to the text field.
Declaration
Swift
public var text: String { get } -
Placeholder for the text view.
Declaration
Swift
public var placeholder: String { get set } -
Image to be used as the right accessory of the text view. Hidden and shown by setting
showArrowImageDeclaration
Swift
public var arrowImage: UIImage? { get set } -
Initializer if data is not being supplied on creation.
Declaration
Swift
public init(with textField: UITextField) -
Initializer if data is being supplied on creation.
Declaration
Swift
public init(with textField: UITextField, data: [String]) -
Undocumented
Declaration
Swift
required public init?(coder aDecoder: NSCoder)
-
Undocumented
Declaration
Swift
public func numberOfComponents(in pickerView: UIPickerView) -> Int -
Undocumented
Declaration
Swift
public func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int -
Undocumented
Declaration
Swift
public func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) -
Undocumented
Declaration
Swift
public func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String?
-
Undocumented
Declaration
Swift
public func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool -
Undocumented
Declaration
Swift
public func textFieldDidBeginEditing(_ textField: UITextField) -
Undocumented
Declaration
Swift
public func textFieldDidEndEditing(_ textField: UITextField) -
Undocumented
Declaration
Swift
public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool -
Undocumented
Declaration
Swift
public func setArrowVisibility(shouldShow: Bool)
-
Sets the attributed placeholder of the textfield with the supplied attributed string.
Declaration
Swift
public func setAttributedPlaceholder(newTitle: NSAttributedString)Parameters
newTitleAttributed string to be assigned as the textfield placeholder
-
Sets the title of the right toolbar button.
Declaration
Swift
public func setToolbarDoneButtonTitle(newTitle: String)Parameters
newTitleString to be assigned as the right button
-
Sets the title of the left toolbar button.
Declaration
Swift
public func setToolbarCancelButtonTitle(newTitle: String) -
Sets the title of the toolbar title in the center.
Declaration
Swift
public func setToolbarTitle(newTitle: String) -
Sets the data displayed in the PickerView
Declaration
Swift
public func setData(with data: [String]) -
Gets the textfield
Declaration
Swift
public func getTextField() -> UITextField -
Gets the picker view
Declaration
Swift
public func getPickerView() -> UIPickerView
DownPicker Class Reference