CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

DKExternalKeyboard 1.0.0

DKExternalKeyboard 1.0.0

Maintained by Denis Kakačka.



  • By
  • deniskakacka

DKExternalKeyboard

CI Status Version License Platform

Example

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

Requirements

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 keyboardContainer: DKExternalKeyboardView = {
    let keyboardContainer = DKExternalKeyboardView()
    keyboardContainer.keyboard.setDelegate(self)

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

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

        return true
    }
}

Author

deniskakacka, [email protected]

License

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