All Projects → marty-suzuki → PickerButton

marty-suzuki / PickerButton

Licence: MIT license
PickerButton is subclass of UIButton that presents UIPickerView in UIKeyboard.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to PickerButton

Closures
Swifty closures for UIKit and Foundation
Stars: ✭ 1,720 (+4095.12%)
Mutual labels:  uibutton, uipickerview
improved-osk-gnome-ext
Improved On Screen Keyboard for Gnome Shell
Stars: ✭ 22 (-46.34%)
Mutual labels:  keyboard
Is Hotkey
Check whether a browser event matches a hotkey.
Stars: ✭ 211 (+414.63%)
Mutual labels:  keyboard
Enigo
Cross platform input simulation in Rust
Stars: ✭ 254 (+519.51%)
Mutual labels:  keyboard
Keyboard Layout Editor For Blender
Allows you to import keyboard layouts into blender and render them in 3d
Stars: ✭ 224 (+446.34%)
Mutual labels:  keyboard
Iqkeyboardmanager
Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more.
Stars: ✭ 15,415 (+37497.56%)
Mutual labels:  keyboard
Punchkeyboard
Punchkeyboard is an open-source keyboard for virtual reality, enhanced with autocomplete and next word prediction functionality for a swift typing experience.
Stars: ✭ 208 (+407.32%)
Mutual labels:  keyboard
FormToolbar
Simple, movable and powerful toolbar for UITextField and UITextView.
Stars: ✭ 85 (+107.32%)
Mutual labels:  keyboard
EmoticonsBoard
Function keyboard and emotions. Android表情键盘,可动态更新表情。
Stars: ✭ 31 (-24.39%)
Mutual labels:  keyboard
Cherry Mx Keycaps
3D models of Chery MX keycaps
Stars: ✭ 250 (+509.76%)
Mutual labels:  keyboard
Rkvm
Virtual KVM switch for Linux machines
Stars: ✭ 237 (+478.05%)
Mutual labels:  keyboard
Windows User Action Hook
A .NET library to subscribe for Windows operating system global user actions such mouse, keyboard, clipboard & print events
Stars: ✭ 224 (+446.34%)
Mutual labels:  keyboard
NumberPicker
Custom number picker
Stars: ✭ 94 (+129.27%)
Mutual labels:  uipickerview
Etterna
Advanced cross-platform rhythm game focused on keyboard play
Stars: ✭ 223 (+443.9%)
Mutual labels:  keyboard
metaKeyboard
turn a common keyboard into a 61-key keyboard for the keyboard shortcut fun like you, I'm a programer, I want to improve coding efficiency
Stars: ✭ 30 (-26.83%)
Mutual labels:  keyboard
Powerkey
Remap your Macbook's power key to Forward Delete
Stars: ✭ 212 (+417.07%)
Mutual labels:  keyboard
Xboxkeyboardmouse
Keyboard and mouse for Xbox One streaming on Windows 10
Stars: ✭ 235 (+473.17%)
Mutual labels:  keyboard
Qmkbuilder
Online GUI for QMK Firmware
Stars: ✭ 254 (+519.51%)
Mutual labels:  keyboard
keyboard
A terrible terrible soft-keyboard that randomises keys on every press.
Stars: ✭ 17 (-58.54%)
Mutual labels:  keyboard
MyAHKScript
An AutoHotkey script that I use on the daily basis for my PC. Comes with an installer that takes care of everything for you.
Stars: ✭ 22 (-46.34%)
Mutual labels:  keyboard

PickerButton

Platform Language Version Carthage compatible License

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.

class ViewController: UIViewController {

    @IBOutlet weak var button: PickerButton!

    let pickerValues: [String] = ["first", "second", "third"]

    override func viewDidLoad() {
        super.viewDidLoad()

        button.delegate = self
        button.dataSource = self
    }
}

extension ViewController: UIPickerViewDelegate, UIPickerViewDataSource {

    func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
        return pickerValues[row]
    }

    func numberOfComponents(in pickerView: UIPickerView) -> Int {
        return 1
    }

    func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
        return pickerValues.count
    }
}

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:

pod "PickerButton"

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.

Author

marty-suzuki, [email protected]

License

PickerButton is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].