When touches Cancelled method get invoked in iPhone?

前端 未结 5 758
南笙
南笙 2021-02-05 07:49

I am able to understand that when user just touches the view, touches Began and Ended called. When user swipes their hand on a view, touches Moved method gets called. But when d

5条回答
  •  长发绾君心
    2021-02-05 08:28

    I was handling touchesBegan()/touchesMoved() on a view under UIScrollView, which is challenging. My touches kept cancelled by somewhere when I pinch (somehow it is OK with single touch movement), I was investigating how to stop being cancelled. I figured out, that there is a property Can Cancel On Scroll on UIScrollView, and you may check it off to stop being cancelled, if your case is similar to my case.

    It sounds there are many cases where your touches are being cancelled, so my answer is just one of them.

提交回复
热议问题