April 2015
Intermediate to advanced
556 pages
17h 47m
English
The intricacies of the NSColor class are beyond the scope of this book, but the basics are sufficient for most Cocoa programming.
NSColor provides a number of class methods returning common colors. Here is a sampling:
class func blackColor() -> NSColor class func purpleColor() -> NSColor class func clearColor() -> NSColor
If you are creating custom controls, you will often want them to blend in with the system. Since colors used in the system can vary from major releases of OS X, and since some colors (such as the highlight color) are configurable by the user, NSColor provides class methods to get these colors, named by their function:
class func controlTextColor() -> NSColor class func ...