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 .default

    Declaration

    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 showArrowImage

    Declaration

    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)

UIPickerView Delegate & Datasource

UITextFieldDelegate

Public functions

  • Sets the attributed placeholder of the textfield with the supplied attributed string.

    Declaration

    Swift

    public func setAttributedPlaceholder(newTitle: NSAttributedString)

    Parameters

    newTitle

    Attributed string to be assigned as the textfield placeholder

  • Sets the title of the right toolbar button.

    Declaration

    Swift

    public func setToolbarDoneButtonTitle(newTitle: String)

    Parameters

    newTitle

    String 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