Skip navigation.
 
mlRe: CALayer - delegate not being called?
FROM : John Clayton
DATE : Wed Nov 28 22:33:56 2007

THAT is a nice explanation Scott.  That particular separation between 
layer compositing attributes and the actual 'contents' itself wasn't 
something that was really at the forefront of my thought there... 
thanks for that.

Now it makes more sense... the delegates are *only* used when getting 
the contents property - and thats it.  Specifically, they are not 
called when any animation properties are being interpolated or 
compositing is being performed.

Enlightenment... the 'bing' feeling... aaaahhhhhhhhh euphoria.  Ta

--
john

On 28/11/2007, at 7:43 PM, Scott Anguish wrote:

> Well, it isn't quite the same.. not drawing, but compositing.
>
> The border is a style attribute (and is an animatable property). 
> All animatable properties are applied by the render-tree when the 
> layer is displayed in the UI.  So they get composited when you 
> change the values via the implied animation (unless of course that 
> has been disabled for the transaction in which case they still will 
> update and draw, but without interpolating the values from the 
> current value to the new value).
>
> You can imagine that if the content was redrawn (by the delegate) 
> every time a value changed and animated (so potentially hundreds of 
> times for a single animation) that you'd lose most of the advantages 
> of Core Animation.
>
> Regardless, animatable properties are not aren't cached and are 
> separate from the content caching process.
>
> You don't have to, and should not, call setNeedsDisplay for any 
> layers that do not have a delegate that provides the content. This 
> will create a content cache and cause more memory to be used for the 
> cached content.  For larger empty layers that are used only to 
> contain other layers it is unnecessary.
>
> I'll spend some time clarifying this in the Core Animation 
> Programming Guide in both the Providing Layer Content and Layer 
> Style Properties chapters.
>
>
> On Nov 28, 2007, at 5:21 AM, John Clayton wrote:
>

>> Hi Scott,
>>
>> But Neil is saying that the border of the layer is visible, thus 
>> the layer must be drawing itself at some point already, right?

>

Related mailsAuthorDate
mlCALayer - delegate not being called? Neil Clayton Nov 27, 23:39
mlRe: CALayer - delegate not being called? Paul Goracke Nov 28, 07:12
mlRe: CALayer - delegate not being called? stephen joseph but… Nov 28, 07:18
mlRe: CALayer - delegate not being called? Paul Goracke Nov 28, 08:02
mlRe: CALayer - delegate not being called? stephen joseph but… Nov 28, 08:33
mlRe: CALayer - delegate not being called? Scott Anguish Nov 28, 09:16
mlRe: CALayer - delegate not being called? John Clayton Nov 28, 11:21
mlRe: CALayer - delegate not being called? Bill Dudney Nov 28, 12:48
mlRe: CALayer - delegate not being called? Paul Goracke Nov 28, 16:34
mlRe: CALayer - delegate not being called? Scott Anguish Nov 28, 19:43
mlRe: CALayer - delegate not being called? John Clayton Nov 28, 22:33
mlRe: CALayer - delegate not being called? Neil Clayton Nov 29, 01:55