setColor(_:forKey:)
Associates the specified color object with the specified key.
Declaration
func setColor(_ color: NSColor, forKey key: NSColor.Name)Parameters
- color:
The color to associate with the given key.
- key:
The key.
Discussion
If the list already contains key, this method sets the corresponding color to color; otherwise, it inserts color at the end of the list by invoking insertColor(_:key:at:).