Sivaprasad Km
Sivaprasad Km

Reputation: 730

How to set gradient background color to NSButton?

I want to set my NSButton(not UIButton) background color to gradient color as like below image. I added background color for NSbuttoncell, But How to add gradient color ?

enter image description here

Upvotes: 0

Views: 718

Answers (1)

l'L'l
l'L'l

Reputation: 47159

Use NSGradient.

- (instancetype)initWithStartingColor:(NSColor *)startingColor
                          endingColor:(NSColor *)endingColor

Upvotes: 0

Related Questions