user2403221
user2403221

Reputation: 445

Make NSButton translucent

I have 2 NSButtons on a NSVisualEffectView. The first buttons image is the system NSEnterFullScreenTemplate image. The image on this first button is translucent.

On the second button I have an image that I imported in Assets.xcassets. On this second button the image is not translucent (it stays white).

How can I make this image also translucent?

Upvotes: 1

Views: 362

Answers (1)

Oskar
Oskar

Reputation: 3702

By using the template setting on NSImage:

button.image.isTemplate = true

Upvotes: 1

Related Questions