Graphics Reference
In-Depth Information
Figure 3.1
UIView
and
CALayer
coordinate systems (with example values)
The
frame
is not really a distinct property of the view or layer at all; it is a
virtual
property, computed from the
bounds
,
position
, and
transform
, and therefore
changes when any of those properties are modified. Conversely, changing the
frame
may
affect any or all of those values, as well.
You need to be mindful of this when you start working with transforms, because when a
layer is rotated or scaled, its
frame
reflects the total axially aligned rectangular area
occupied by the transformed layer within its parent, which means that the
frame
width and
height may no longer match the
bounds
(see Figure 3.2).