Reputation: 1341
I have created my own custom keyboard and I want to show list of keyboards view as Apple does. How can I reach this?
Upvotes: 1
Views: 485
Reputation: 195
Yes it's possible since iOS 10
If you have an UIButton
called nextKeyboardButton
just add that in your viewDidLoad
function.
nextKeyboardButton.addTarget(self, action: #selector(handleInputModeList(from:with:)), for: .allTouchEvents)
handleInputModeList
is part of UIInputViewController
Upvotes: 2
Reputation: 17710
This is not possible.
Apple documentation for developing custom keyboards says (emphasis mine):
To ask the system to switch to another keyboard, call the
advanceToNextInputMode
method of theUIInputViewController
class. The system picks the appropriate “next” keyboard; there is no API to obtain a list of enabled keyboards or for picking a particular keyboard to switch to.
Note that you must provide a way to get to the next keyboard using the above method.
Upvotes: 1