美文网首页
解决touchs与UITapGestureRecognizer冲

解决touchs与UITapGestureRecognizer冲

作者: 幻想综合症患者 | 来源:发表于2017-02-08 17:06 被阅读237次

两者同时使用时touchesBegan执行延时touchesCancelled先执行因此看不到触摸效果,通过断点可知touchesBegan是执行了的并且断点后每次点击都会有效果,对UITapGestureRecognizer添加 _tapGR.cancelsTouchesInView = NO;可解决问题

相关文章

网友评论

      本文标题:解决touchs与UITapGestureRecognizer冲

      本文链接:https://www.haomeiwen.com/subject/hremittx.html