I am working with multitouch while writing. Therefore, basically I do this, I write with hand support, because, as a rule, its user rights, I followed this link How to ignore certain UITouch points in a multitouch sequence
Everything works fine, but their problem is with the cancellation, when I write by hand, touching the screen, otherwise it works fine.
Below is my code
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch* topmostTouch = self.trackingTouch; for (UITouch *touch in touches) { ctr = 0; touchStartPoint1 = [touch locationInView:self]; [m_undoArray removeAllObjects]; [m_redoArray removeAllObjects]; [m_parentRedoArray removeAllObjects]; if(!topmostTouch || [topmostTouch locationInView:self].y > touchStartPoint1.y) { topmostTouch = touch; pts[0] = touchStartPoint1; } } if (self.trackingTouch != nil && self.trackingTouch != topmostTouch)
Here is an image to better understand my problem, I wrote this first


After clicking on Undo once, you can see above that the other part was canceled, not the last part. Therefore, I need help in this regard.
ios uikit nsmutablearray core-graphics undo-redo
Ranjit Feb 21 2018-12-14T00: 00Z
source share