NSButton - Gray rectangle whenever the custom button is clicked
-
17-02-2021 - |
Domanda
Can I just want to replace the appearance by setting a property of NSButton?
I am able to change the appearance by using the "image" property of the button but I got an ugly gray rectangle whenever the custom button is clicked (the image has a transparency). Is there a way to hide that rectangle?
Thanks.
Soluzione
The following call changes the behavior by making image be darkened when clicked:
[[button cell] setHighlightsBy:NSContentsCellMask];
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow