33 Core Animation

In Chapter 17 you subclassed NSView to perform custom drawing in your application. You issued drawing commands and Quartz drew them on the screen. This is sufficient for many applications, where you might need to draw graphs or use basic, relatively static controls. This style of drawing can be intensive, however, and making it perform well requires that the developer to expend a lot of effort. For example, you want to only draw the parts of the view that have changed.

Core Animation takes a much different tack: instead of issuing drawing commands, the programmer composes the view by creating layers. Layers can display images or Bezier paths, and their appearance can be further manipulated by setting their ...

Get Cocoa Programming for OS X: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.