Skip to content
This repository was archived by the owner on Feb 26, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Sources/ObjC/UBSignatureDrawingViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,24 @@ - (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
[super touchesMoved:touches withEvent:event];

//Cancel touch immediately after automatically over the artboard range
CGPoint touchPoint = [self.class _touchPointFromTouches:touches];
BOOL isContain = [self.view.layer containsPoint:touchPoint];
if (!isContain) {
[self.view touchesCancelled:touches withEvent:event];
return;
}

[self _updateModelWithTouches:touches endContinuousLine:NO];
}

- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(nullable UIEvent *)event{
[super touchesEnded:touches withEvent:event];

[self.model asyncEndContinuousLine];
[self _updateViewFromModel];
}

#pragma mark - Private

- (void)_updateModelWithTouches:(NSSet<UITouch *> *)touches endContinuousLine:(BOOL)endContinuousLine
Expand Down