Created
April 30, 2015 23:15
-
-
Save gabrielcsapo/7f7b4eb8b569fc911e82 to your computer and use it in GitHub Desktop.
set background color for NSButton
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NSColor *color = [NSColor colorWithCalibratedRed:0.121f green:0.4375f blue:0.1992f alpha:0.2578f]; | |
// | |
// [btnAdd setWantsLayer:YES]; | |
// btnAdd.layer.backgroundColor = color.CGColor; |
unfortunately not working
//in swift:
(button.cell as! NSButtonCell).bordered = false//The background color is used only when drawing borderless buttons.
(button.cell as! NSButtonCell).backgroundColor = NSColor.redColor()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Its not working