openfrog openfrog - 9 months ago 60
iOS Question

How to delay a CABasicAnimation?

I have a CABasicAnimation and want to start it after a delay. In UIKit I can specify delays. CAMediaTiming protocol has a timeOffset property but I can't see an effect. My next try is to use GCD to delay it but it feels like overkill.

Answer Source

Shouldn't you be using the [CAMediaTiming beginTime] property (reference)?

See Customizing the Timing of an Animation in the Core Animation Programming Guide.