# ToolbarUIPickerView

    class ToolbarUIPickerView : UIPickerView

Class creating an UI PickerView with a toolbar. The toolbar has 2 buttons; a ‘Done’ and a ‘Cancel’ button. A protocol is defined so a host class using the ToolbarUIPickerView can become a delegate and implement the didTapDone and didTapCancel methods for handling the 2 toolbar buttons.

- `toolbar`

  Custom UIToolBar

  #### Declaration

  Swift

      private(set) var toolbar: UIToolbar? { get }

- `toolbarDelegate`

  toolbarDelegate, set this to the class acting as ToolbarUIPickerViewDelegate

  #### Declaration

  Swift

      weak var toolbarDelegate: ToolbarUIPickerViewDelegateProtocol?

- `init(frame:)`

  Override Initialiser

  #### Declaration

  Swift

      override init(frame: CGRect)

  #### Parameters

  `frame` | CGRect

- `init(coder:)`

  Required initialiser

  #### Declaration

  Swift

      required init?(coder aDecoder: NSCoder)

  #### Parameters

  `aDecoder` | NSCoder

- `commonInit()`

  Initialises the toolbar and its properties

  #### Declaration

  Swift

      private func commonInit()

- `doneTapped()`

  Action handler handling the tapping of the Done button. Forwards control to the toolbar delegate didTapDone method

  #### Declaration

  Swift

      @objc
      func doneTapped()

- `cancelTapped()`

  Action handler handling the tapping of the Cancel button. Forwards control to the toolbar delegate didTapCancel method

  #### Declaration

  Swift

      @objc
      func cancelTapped()

Copyright (c) 2018-2024, AB Circle Ltd. All rights reserved.

Generated by jazzy ♪♫ v0.14.3, a Realm project.