To run the example project, clone the repo, and run pod install
from the Example directory first.
DKExternalKeyboard is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'DKExternalKeyboard'
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
}
}
Denis Kakačka, deniskakacka@gmail.com
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
DKExternalKeyboard is available under the MIT license. See the LICENSE file for more info.