Although AppKit contains a lot of classes, for a variety of purposes, a significant proportion of the framework is responsible for creating graphical user interfaces. This chapter will explore the concepts behind Cocoa GUIs and some of the classes used to create them.
Cocoa, like most other GUI toolkits, uses a Cartesian coordinate system for drawing. Points are described by the
NSPoint structure, which contains two
doubles, depending on whether you are on a 32- or 64-bit system. This structure has the same layout as the
CGPoint structure, and the two can be used mostly interchangeably.