I'm trying to create a resizable button that has an evenly dotted circle border around it. If you simply put:
Circle()
.stroke(color, style: StrokeStyle(lineWidth: 3, lineCap: .butt, dash: [3, radius / 3.82]))
.frame(width: radius * 2, height: radius * 2)
There might be an uneven distribution of dots as you can see in the below image:
Here's a related question with a solution which I tried adapting from UIKit into a SwiftUI struct but also failed.
Can someone please help me either find a way to adapt that "dash" value to create an evenly dashed stroked border with dependence on the radius OR create a custom shape instead?