Graphics Reference
In-Depth Information
Figure 10.3
The standard
CAMediaTimingFunction
easing curves
For our custom clock hand easing function, we want a shallow curve initially, then a steep
curve right up until the last second where it eases off. With a bit of experimentation, we end
up with this:
[
CAMediaTimingFunction
functionWithControlPoints:
1
:
0
:
0.75
:
1
];
If we drop this into our timing function graphing app, we get the curve shown in Figure
10.4. If we add this into the clock program, we have the nice
tick
effect we were looking for
(see Listing 10.5).