Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

add arc swiftui

struct MyShape : Shape {
    func path(in rect: CGRect) -> Path {
        var p = Path()

        p.addArc(center: CGPoint(x: 100, y:100), radius: 50, startAngle: .degrees(0), endAngle: .degrees(90), clockwise: true)

        return p.strokedPath(.init(lineWidth: 3, dash: [5, 3], dashPhase: 10))  // To make it a dashed line.
    }    
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #arc #swiftui
ADD COMMENT
Topic
Name
9+7 =