Lots of examples on how to do create a glow effect on iOS UIView, but how do you do it on macOS? Preferably in Swift.
Thanks.
Lots of examples on how to do create a glow effect on iOS UIView, but how do you do it on macOS? Preferably in Swift.
Thanks.
Your question is a little vague (in particular, what is a "glow effect"?), but what I think you mean is a shadow effect with a light colour instead of a dark colour.
For this, you merely have to configure the NSView layer's shadow
property, as per the documentation at:
https://developer.apple.com/reference/appkit/nsview/1483263-shadow
Give the shadow a (0,0) offset to centre it behind the view, give it a decent radius around the edge of the view, and give it a light glowing colour, and appropriate opacity.
Complete code example is at: How to display shadow for NSView?
If shadow is not what you're after, you may need to edit your question and elaborate on what you mean.