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

15. Layer Performance

Doing more things faster is no substitute for doing the right things.

Stephen R. Covey

Chapter 14, “Image IO,” discussed how we can efficiently load and display images, with a view to avoiding performance glitches that might impact animation frame rate. In this final chapter, we study the performance of the layer tree itself and how to get the best out of it.

Inexplicit Drawing

The layer backing image can be drawn on-the-fly using Core Graphics, or set directly using the contents property by supplying an image loaded from a file, or drawn beforehand in an offscreen CGContext. In the previous two chapters, we talked about optimizing both of these scenarios. But in addition to explicitly creating a backing image, you can ...

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