Skip to Content
iOS Core Animation: Advanced Techniques
book

iOS Core Animation: Advanced Techniques

by Nick Lockwood
August 2013
Intermediate to advanced content levelIntermediate to advanced
356 pages
9h 54m
English
Addison-Wesley Professional
Content preview from iOS Core Animation: Advanced Techniques

3. Layer Geometry

Let no one unversed in geometry enter here.

Sign above the entrance to Plato’s Academy

Chapter 2, “The Backing Image,” introduced the layer-backing image and the properties used to control its position and scaling within the layer bounds. In this chapter, we look at how the layer itself is positioned and sized with respect to its superlayer and siblings. We also explore how to manage your layer’s geometry and how it is affected by autoresizing and autolayout.

Layout

UIView has three primary layout properties: frame, bounds, and center. CALayer has equivalents called frame, bounds, and position. Why they used “position” for layers and “center” for views will become clear, but they both represent the same value.

The frame represents ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Graphics and Animation on iOS

Graphics and Animation on iOS

Vandad Nahavandipoor
Swift iOS Programming for Kids

Swift iOS Programming for Kids

Steffen D. Sommer, Jim Campagno

Publisher Resources

ISBN: 9780133440744