On Sun, Nov 7, 2010 at 4:35 PM, Seth Willits <sli...@araelium.com> wrote: > On Nov 7, 2010, at 2:28 PM, Kyle Sluder wrote: > >> If nested transactions counted, you could never use this method safely and >> call into framework or other code. Any transactions that other code creates >> would screw up your own timing, even if the animations were entirely >> unrelated to your own. > > I don't see how it'd make anything unsafe. Waiting on the timing of all > nested animations is the point of the completion block. Apple agrees, given > that in my second example it does that as I expect.
Apparently I've been misreading your second example, thinking there was an action in the outer transaction. I think the second example is in fact wrong. It's unsafe in the sense that if you call out to other code that creates nested transactions, the assumption that your completion handler will be called at the time that your last action finishes is no longer valid. We wound up subclassing CAAnimationGroup to add completion handler support in a more logical place: https://github.com/omnigroup/OmniGroup/blob/master/Frameworks/OmniQuartz/OQAnimationGroup.h --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com