Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
initWithTarget我使用构造函数和addTarget方法编写了 UIGestureRecognizer 的子类removeTarget。
initWithTarget
addTarget
removeTarget
现在,我的问题是我找不到任何访问器或辅助方法来调用这些目标操作。
我相信应该有任何目标和行动的列表/数组......
文档在那个特定问题上有些薄弱。
谢谢你的帮助,
亚历克斯
超类为您处理。您只需要将 设置state为正确的值:
state
self.state = UIGestureRecognizerStateRecognized
请仔细阅读指南,包括那里的示例识别器。