Cancelling a CATransaction's completionBlock
Cancelling a CATransaction's completionBlock
- Subject: Cancelling a CATransaction's completionBlock
- From: Graham Cox <email@hidden>
- Date: Tue, 26 Jul 2011 22:09:06 +1000
I'm using a completion block with CATransaction to clear a few ivars when an animation finishes. The animation takes quite a few seconds, so it's quite easy for an event which 'undoes' the same animation to arrive during that time. That's no big problem - the animation just goes to the new value. Problem is that the completionBlock still runs, so the variable gets cleared, when on this occasion it shouldn't.
I could set up some flags that the completion block can check before it does its work (messy), or I could just cancel the current transaction (clean). But, I can't seem to find out if that's possible. The docs and methods of CATransaction don't seem to have anything that would allow this.
What should I do?
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden