How to draw a circle path with color gradient stroke
In macOS 10.14 and later (as well as in iOS 12 and later), you can create a CAGradientLayer with a type of .conic, and then mask it with a circular arc. For example, for macOS: class GradientArcView: NSView { var startColor: NSColor = .white { didSet { setNeedsDisplay(bounds) } } var endColor: NSColor = .blue … Read more