Graphics Programs Reference
In-Depth Information
Even though a layer doesn't have a
frame
property, you can still get and set its “frame”
by sending it the messages
frame
and
setFrame:
. When a layer is sent the message
frame
, it computes a rectangle from its
position
and
bounds
properties. Similarly,
when sending a layer the message
setFrame:
, it does some math and then sets the
bounds
and
position
properties accordingly.
However, it is better to think of layers in terms of their
position
and
bounds
proper-
ties. The mental math needed to animate a layer is much simpler if you stick to setting the
bounds
and
position
properties directly.