1

I have created a custom keyboard with the Custom Keyboard in Xcode 6 & 7. I am wondering if it is possible to use the Custom keyboard by default without making the user go and installing it. I have looked into UIkeyboardType and inputView but haven't had luck finding the right way of accomplishing this. I saw an example from an app called "Hanx Writter" that launches with its custom keyboard with out the user having to install it in the setting first.

rmaddy
  • 314,917
  • 42
  • 532
  • 579

1 Answers1

2

There is no way to set a third party keyboard as the system keyboard without the user installing it themselves.

However, you can achieve similar functionality with a little more work by displaying your keyboard view instead of the system keyboard. You need to use the inputView property on UITextField or UITextView to accomplish this.

Here is a tutorial that lays it out in detail, including setting up the keyboard in Interface Builder. Assuming you've already built the keyboard view and have all of the actions set up, the relevant code will look something like this:

let customKeyboard = CustomKeyboard()
let textField = UITextField()

textField.inputView = customKeyboard

Again, this will not set your CustomKeyboard as the system keyboard or install it as an available third party keyboard, but it will display your CustomKeyboard instead of the system keyboard when the textField becomes the first responder.

mclaughj
  • 12,645
  • 4
  • 31
  • 37