Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Into the Third Dimension
Chapter 6 discussed how to use CAAffineTransform to make UIView drawing much more efficient. This technique limits you to two-dimensional transformations: translate, rotate, scale, and skew. With layers, however, you can apply three-dimensional transformations by adding perspective. This is often called 2.5D rather than 3D because it doesn’t make layers into truly three-dimensional objects in the way that OpenGL ES does. But it does allow you to give the illusion of three-dimensional movement.
You rotate layers around an anchor point. By default, the anchor point is in the center of the layer, designated {0.5, 0.5}. It can be moved anywhere within the layer, making it convenient to rotate around an edge or corner. The anchor point is described in terms of a unit square rather than in points. So the lower-right corner is {1.0, 1.0}, no matter how large or small the layer is.