Graphics Reference
In-Depth Information
CHAPTER 1
IN THIS CHAPTER
What Is Core
Animation?
. Animation and the Cartesian
Plane
. Your Free Lunch
. What Is a Layer?
. Animation and Layers
. Math? I Was Told There Would
Be No Math
C ore Animation enables you to develop complex anima-
tions for many different types of applications. You can
simply animate your views within a window, or you can
create a thousand sprites represented by layers on the
screen for that next killer game. In this chapter, we intro-
duce you to the basic concepts behind Core Animation.
We take a look at views and layers to ensure you under-
stand what you can do with animation in each. We start
with a discussion about animation and the coordinate
plane and then move on to getting well acquainted with
the Core Animation base class, CALayer , and its related
protocols.
. Core Animation and the
iPhone
. Notes on Sample Projects
Animation and the Cartesian
Plane
When you have become familiar with Core Animation and
start using it in your applications, you will see that anima-
tion is easy on both Mac OS X and the iPhone. The fact is,
though, that animation has not always been easy. Prior to
Core Animation, you needed to understand some fairly
complex subjects such as double buffering and more
complicated mathematics such as plane geometry—espe-
cially if you wanted to give your animations any sense of
depth. Core Animation abstracts all of that away. If you
wanted to move a sprite across the screen doing it the old
way, you needed to create an off-screen graphics context,
draw your sprite to that context, swap out that context
 
 
Search WWH ::




Custom Search