Multitouch tracking issue

后端 未结 2 1133
有刺的猬
有刺的猬 2020-12-11 22:40

I am working with multitouch while writing, So basically what I am doing is, I am writing with hand support, because typically, its how user rights, I followed this link How

2条回答
  •  旧时难觅i
    2020-12-11 23:00

    You will need to debug to confirm, but it appears to be related to your logic in touchesBegan:withEvent:. In this method, you check each time there is a new touch to determine if it is the 'highest', but when the highest touch does actually change you don't seem to abort / reset any existing drawing.

    Your best approach is probably using logging to determine if / when the 'highest' touch is changing and what affect that has on the in-progress line.

    Also, in touchesMoved:, you don't need the for (UITouch *touch in touches) loop as you already have a reference to self.trackingTouch so you can just use it directly.

提交回复
热议问题