• 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
Re: CATransactions having no effect in CALayer draw delegate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CATransactions having no effect in CALayer draw delegate


  • Subject: Re: CATransactions having no effect in CALayer draw delegate
  • From: Ken Tozier <email@hidden>
  • Date: Sun, 19 Jun 2011 14:01:29 -0400

On Jun 19, 2011, at 1:03 PM, Kyle Sluder wrote:

> You're mixing conceptual layers here.
>
> CG drawing isn't animated at all. The animation happens at the Core
> Animation layer. When CA asks your layer to -drawInContext: that's an
> atomic operation from CA's perspective. The thing getting animated is
> whatever that context was attached to.

Not sure I'm following that. Ultimately, the context for all drawing is the graphics port of the window, but the docs go to great lengths describing all the ways you can perform extremely granular operations on individual layers and sublayers. The thing doing the drawing is a subclass of CALayer. What did you mean by "The thing getting animated is whatever that context was attached to"?

>
>> I tried the suggestion by David Duncan here (http://www.cocoabuilder.com/archive/cocoa/279886-calayer-with-no-animation.html) and overrode
>
> It sounds like you didn't understand what he was saying.

After trying and failing with the action override, I went back and read the docs (http://tinyurl.com/CALayerActionForKey) and it sure seems like returning nil is the correct thing to do. I understand that "actionForKey" call comes after I do my drawing, but something else is calling that and is ignoring the nil return, because the stuff I draw in "drawInContext" is happily animating all sorts of things (like transitions between square and rounded corners on the path and the size of the image)

What is the correct understanding of what he was saying?

Under the section "Overriding the Duration of Implied Animations", here (http://tinyurl.com/OverridingImplicitAnimations) it shows the use of transactions that are basically what I'm doing in my drawInContextSuppressed method. Since I'm not actually setting a predefined property of the layer, I'm unclear on where to actually put this transaction...


_______________________________________________

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

  • Follow-Ups:
    • Re: CATransactions having no effect in CALayer draw delegate
      • From: Kyle Sluder <email@hidden>
References: 
 >CATransactions having no effect in CALayer draw delegate (From: Ken Tozier <email@hidden>)
 >Re: CATransactions having no effect in CALayer draw delegate (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Synthesised properties and additional actions
  • Next by Date: Re: Synthesised properties and additional actions
  • Previous by thread: Re: CATransactions having no effect in CALayer draw delegate
  • Next by thread: Re: CATransactions having no effect in CALayer draw delegate
  • Index(es):
    • Date
    • Thread