Re: CATransaction setCompletionBlock - Nested Transactions bug?
Re: CATransaction setCompletionBlock - Nested Transactions bug?
- Subject: Re: CATransaction setCompletionBlock - Nested Transactions bug?
- From: Kyle Sluder <email@hidden>
- Date: Sun, 7 Nov 2010 14:28:46 -0800
On Nov 7, 2010, at 2:20 PM, Seth Willits <email@hidden> wrote:
> On Nov 7, 2010, at 1:42 PM, Kyle Sluder wrote:
>
>> It sounds like you're confusing transactions with animation groups.
>
> To touch on this, I certainly don't believe I am.
>
> The inner transaction code is all a self-contained atomic action. What I need to do is simply call the self-contained action, and when it's done, fire off another particular action. A CATransaction completion block sounds perfect for that to me. Paraphrasing: "At the end of any animations performed within this transaction, run the completion block." That's exactly what I want, and to me, nested transactions with animations should count. Whether they do or not is not clear. Using an animation group to try to achieve the same would be a lot more code and involve more entanglement between things.
But transactions aren't actions. I'd even argue that putting this convenience method on CATransaction might have been a mistake.
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.
--Kyle Sluder_______________________________________________
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