Skip to content

Keyboard for external displays where system's keyboard cannot be showed, for example when streaming app to external display as headunits in cars.

License

Notifications You must be signed in to change notification settings

denis-kakacka-tg/DKExternalKeyboard

Repository files navigation

DKExternalKeyboard

Version Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

DKExternalKeyboard is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'DKExternalKeyboard'

Usage

import DKExternalKeyboard
private lazy var keyboardView: DKExternalKeyboardView = {
    let keyboardView = DKExternalKeyboardView()
    keyboardView.keyboard.setDelegate(self)

    return keyboardView
}()
extension ViewController: DKExternalKeyboardDelegate {
    func didTapSearch(query: String?) {
        keyboardView.keyboard.hide()
    }
}
extension ViewController: UITextFieldDelegate {
    func textFieldDidBeginEditing(_ textField: UITextField) {
        keyboardView.keyboard.show(for: textField, on: view)
    }

    func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool {
        let emptyViewForSystemKeyboard = UIView(frame: .zero)
        textField.inputView = emptyViewForSystemKeyboard

        return true
    }
}

Author

Denis Kakačka, deniskakacka@gmail.com

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

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

About

Keyboard for external displays where system's keyboard cannot be showed, for example when streaming app to external display as headunits in cars.

Resources

License

Stars

Watchers

Forks

Packages