Does anyone have an example of proper use of the method handleInputModeList in UIInputViewController?

The method signature is as follows:


handleInputModeList(from: UIView, with: UIEvent)


I've overridden the touches methods in the UIControl view and passed that along to the function. The call returns successfully, but the menu does not display. If you've gotten this to work, please share your solution.


I've also tried by calling on the touch up in side event, in that case the call changes to the next keyboard without showing the menu.

Answered by litehouse in 247111022

Here's a solution for anyone who may be working on the same problem. Add the method as a target of the button as follows:


addTarget(self, action: #selector(handleInputModeList(from:with:)), for: .allTouchEvents)
Accepted Answer

Here's a solution for anyone who may be working on the same problem. Add the method as a target of the button as follows:


addTarget(self, action: #selector(handleInputModeList(from:with:)), for: .allTouchEvents)
Does anyone have an example of proper use of the method handleInputModeList in UIInputViewController?
 
 
Q