Graphics Reference
In-Depth Information
Figure 9.1 A test program to demonstrate the duration and repeatCount properties
An alternative way to create a repeating animation is to use the repeatDuration property,
which tells the animation to repeat for a fixed time period instead of for a fixed number of
iterations. You can even set a property called autoreverses (of type BOOL ) to make the
animation play backward during each alternate cycle. This is great for playing a nonlooping
animation continuously, such as a door swinging open and then shut (see Figure 9.2).
Figure 9.2 A swinging door animation
Search WWH ::




Custom Search