I have a CALayer which I merely create and add to a subview of my view controller's main view in the controller's initWithNibName: And then, I perform the following animation:
[CATransaction begin];
[CATransaction setAnimationDuration:2];
[logoLayer setOpacity:0];
[CATransaction commit];
How can I tell when this animation is done? the performSelector: delayed by 2 secs. approach doesn't seem "the right way" to go about it.
According to the doc,
[CATransaction setCompletionBlock:]
could be used for what you want.It says
Try adding something like this before you
begin
the animation transaction.