-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Mastering macOS Programming
By :

We could think of Core Animation layers as a lightweight version of NSView
. Layers don't come with many of the properties that we generally associate with views, particularly those associated with user interaction, but much of a view's appearance is in fact the product of its underlying layer.
Almost any CALayer
property is animatable--check the CALayer
docs for anything that is labeled CAAnimatable
.
Subclasses of CALayer
can implement the drawInContext
method to use Core Graphics drawing methods, or they can set a delegate that implements a drawLayer:inContext
method. But Core Graphics is a 2D framework, whereas CALayer
offers support for perspective and 3D drawing.
To look at what Core Animation can do, we'll need a window to view it in, so let's get that set up first:
Main.storyboard
in the project navigator.Window Controller Scene
, then expand the Window Controller
, and then...