• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cancelling a CATransaction's completionBlock
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Disable Lion's window restoration?
  • Next by Date: Re: Fastest high-quality thumbnail display
  • Previous by thread: [ANN] LuaCocoa v.0.3 released
  • Next by thread: ANN: CouchCocoa framework (CouchDB API)
  • Index(es):
    • Date
    • Thread