I need to create a custom keyboard for my app, but no sure the best way to do it without the user needing to add a keyboard in the settings. If I create a keyboard extension is it possible to set a UITextField's Keyboard Type
to that custom keyboard? Or will I have to use a UIView to accomplish this?
Asked
Active
Viewed 2,337 times
2

Noah Iarrobino
- 1,435
- 1
- 10
- 31
-
what exactly you want to achieve, could you please explain a bit more? – Sanoj Kashyap Aug 14 '20 at 18:38
-
I want to create a custom keyboard, I want a number pad but also some custom buttons on it. The easiest way to do it would be a keyboard extension, but I dont want users to have to go to their keyboard settings and add a new keyboard. I want it to work right out of the box. So I want to know if I can create a keyboard extension, and make that keyboard the default keyboard for text fields in my app – Noah Iarrobino Aug 14 '20 at 18:43
-
Does this answer your question? [how to add a custom key to Keyboard in ios?](https://stackoverflow.com/questions/16849531/how-to-add-a-custom-key-to-keyboard-in-ios) – Sanoj Kashyap Aug 14 '20 at 18:52
2 Answers
1
You can add accessoryView
to text view for you want to give a few extra buttons.
If you still looking for some more then please go through the below link. https://www.cocoacontrols.com/search?utf8=%E2%9C%93&q=keyboard

Sanoj Kashyap
- 5,020
- 4
- 49
- 75
-
Adding a few extra buttons wouldn't be enough, I would want to present a whole view onto the keyboard after a button is pressed – Noah Iarrobino Aug 14 '20 at 22:22
1
For a custom keyboard that is specific to a single app, create a view and assign the view to UITextField.inputView:
textField.inputView = YourCustomKeyboard()
In my search I didn't find a way to tack on additional keys but there are examples of custom keyboards using inputView that are easy to adapt.

Marcy
- 4,611
- 2
- 34
- 52