I've never worked with CATransition
before, but I think you can do this with NSTimer
, GCD
, or performSelector:withObject:afterDelay:
.
For instance:
double delayInSeconds = 0.3;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
[self doSomething];
});
where doSomething
is
-(void)doSomething{
[self pauseLayer:thisLayer];
//do something
[self resumeLayer:thisLayer];
}