I have a UIView with several UILabels that is animating from top to bottom and vice versa. A sort of Autoque let\'s say :) I use 2 functions:
-(void)goUp
-(
Hope it will help you.
- (void)goUP{
CFTimeInterval pausedTime = [self.layer timeOffset];
self.layer.speed = 1.0;
self.layer.timeOffset = 0.0;
self.layer.beginTime = 0.0;
CFTimeInterval timeSincePause = [self.layer convertTime:CACurrentMediaTime() fromLayer:nil] - pausedTime;
self.layer.beginTime = timeSincePause;
}
- (void)goDown{
CFTimeInterval pausedTime = [self.layer convertTime:CACurrentMediaTime() fromLayer:nil];
self.layer.speed = 0.0;
self.layer.timeOffset = pausedTime;
}
When you call the Layer animate, it will effect all layer tree and submode layer animate.