How can I give image input rounded corners? (mac app)

How can I allow images added by a user to be displayed with rounded corners in a macOS app (not iOS) using swift.
Answered by Claude31 in 665376022
You should subclass NSImageView and draw image in a layer.

See code here
https :// bluelemonbits. com/2019/12/31/ nsimage-with-rounded-edges/

Thanks to tell if that's what you were looking for. And don't forget to close the thread.
Accepted Answer
You should subclass NSImageView and draw image in a layer.

See code here
https :// bluelemonbits. com/2019/12/31/ nsimage-with-rounded-edges/

Thanks to tell if that's what you were looking for. And don't forget to close the thread.
How can I give image input rounded corners? (mac app)
 
 
Q