Created
November 15, 2024 04:40
-
-
Save Shubham0812/2ad659d2fdfb4d7b01f399d52598bf64 to your computer and use it in GitHub Desktop.
TaskRowView
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct Tick: Shape { | |
func path(in rect: CGRect) -> Path { | |
let cX = rect.midX | |
let cY = rect.midY | |
var path = Path() | |
path.move(to: CGPoint(x: cX - 42, y: cY - 4)) | |
path.addLine(to: CGPoint(x: cX - 18, y: cY + 28)) | |
path.addLine(to: CGPoint(x: cX + 40, y: cY - 36)) | |
return path | |
} | |
} | |
#Preview { | |
Tick() | |
.stroke(style: StrokeStyle(lineWidth: 4, lineCap: .round, lineJoin: .round)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment