PickerButton
PickerButton is subclass of UIButton that presents UIPickerView in keyboard.
Concept
When PickerButton is tapped, it presents UIPickerView on UIKeyboard.
PickerButton | inputView | inputAccessoryView |
---|---|---|
PickerButton is in conformity to UIKeyInput. | PickerButton returns UIPickerView as inputView. | PickerButton returns UIToolBar as inputAccessoryView. |
![]() |
![]() |
![]() |
When selected row or component is changed, button title is automatically updated.
Usage
PickerButton is almost same interface as UIPickerView.
To use PickerButton in Storyboard / Xib, set Custom Class to PickerButton
.
Requirements
- Swift 4.2
- Xcode 10.1 or greater
- iOS 10.0 or greater
Installation
CocoaPods
PickerButton is available through CocoaPods. To install
it, simply add the following line to your Podfile:
Carthage
If you’re using Carthage, simply add
PickerButton to your Cartfile
:
github "marty-suzuki/PickerButton"
Make sure to add PickerButton.framework
to "Linked Frameworks and Libraries" and "copy-frameworks" Build Phases.