O'Reilly logo

iOS Core Animation: Advanced Techniques by Nick Lockwood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5. Transforms

Unfortunately, no one can be told what the Matrix is. You have to see it for yourself.

Morpheus, The Matrix

In Chapter 4, “Visual Effects,” we looked at some techniques to enhance the appearance of layers and their contents. In this chapter, we investigate CGAffineTransform, which can be used to rotate, reposition, and distort our layers, and at CATransform3D, which can change boring flat rectangles (albeit rounded rectangles with drop-shadows) into three-dimensional surfaces.

Affine Transforms

In Chapter 3, “Layer Geometry,” we made use of the UIView transform property to rotate the hands on a clock, but we didn’t really explain what was going on behind the scenes. The UIView transform property is of type CGAffineTransform, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required