Macos 如何将渐变背景色设置为NSButton?
我想将我的NSButton(不是UIButton)背景色设置为渐变色,如下图所示。我为NSbuttoncell添加了背景色,但是如何添加渐变色呢 使用Macos 如何将渐变背景色设置为NSButton?,macos,gradient,background-color,nsbutton,Macos,Gradient,Background Color,Nsbutton,我想将我的NSButton(不是UIButton)背景色设置为渐变色,如下图所示。我为NSbuttoncell添加了背景色,但是如何添加渐变色呢 使用 - (instancetype)initWithStartingColor:(NSColor *)startingColor endingColor:(NSColor *)endingColor
- (instancetype)initWithStartingColor:(NSColor *)startingColor
endingColor:(NSColor *)endingColor