From a26da8590e4086a00e489636ecc0ccebcb979d9c Mon Sep 17 00:00:00 2001 From: alekzuz Date: Wed, 17 Nov 2021 15:41:57 +0300 Subject: [PATCH] fixed dot --- Source/SwiftyDraw.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/SwiftyDraw.swift b/Source/SwiftyDraw.swift index 9902cd8..b4aebb7 100644 --- a/Source/SwiftyDraw.swift +++ b/Source/SwiftyDraw.swift @@ -247,6 +247,10 @@ open class SwiftyDrawView: UIView { /// touchedEnded implementation to capture strokes override open func touchesEnded(_ touches: Set, with event: UIEvent?) { guard isEnabled, let touch = touches.first else { return } + let newPath = createNewPath() + if let currentPath = drawItems.last { + currentPath.path.addPath(newPath) + } delegate?.swiftyDraw(didFinishDrawingIn: self, using: touch) }