insertNewButtonImage(_:in:)
Sets the image of a given button cell.
Declaration
@MainActor func insertNewButtonImage(_ newButtonImage: NSImage, in buttonCell: NSButtonCell)Parameters
- newButtonImage:
The image to set for the button cell.
- buttonCell:
The
NSButtonCellobject that lets the user choose the picker from the color panel—the color picker’s representation in theNSMatrixof theNSColorPanel.
Discussion
This method should perform application-specific manipulation of the image before it’s inserted and displayed by the button cell.