开发者

calling UIGestureRecognizers targets & actions

开发者 https://www.devze.com 2023-01-16 13:31 出处:网络
I wrote a subclass of UIGestureRecognizer using the initWithTarget constructor as well as addTarget, removeTarget methods.

I wrote a subclass of UIGestureRecognizer using the initWithTarget constructor as well as addTarget, removeTarget methods.

Now, my problem is that I am unable to find any accessors or helper 开发者_Go百科methods to call these targets actions.

I believe there should be any List/Array of targets and actions ...

The docs are somehow weak in that particular question.

Thanks for any help,

Alex


The superclass handles that for you. You just need to set the state to the correct value:

self.state = UIGestureRecognizerStateRecognized

Please read the guide carefully, including the example recognizer there.

0

精彩评论

暂无评论...
验证码 换一张
取 消