Skip to content
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
4 changes: 4 additions & 0 deletions Source/SwiftyDraw.swift
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ open class SwiftyDrawView: UIView {
/// touchedEnded implementation to capture strokes
override open func touchesEnded(_ touches: Set<UITouch>, 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)
}

Expand Down