Proper implementation of handleInputModeList in Custom Keyboard

↘锁芯ラ 提交于 2019-12-07 09:18:27

I was going about this the wrong way. No need for custom gesture handling. As noted in the headers, one should add a target-action to the control they want to trigger this, like so:

Objective-C:
[keyboardButton addTarget:self action:@selector(handleInputModeListFromView:withEvent:) forControlEvents:UIControlEventAllTouchEvents];

Swift:
keyboardButton.addTarget(self, action: #selector(handleInputModeList(from:with:)), for: UIControlEvents.allTouchEvents)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!