How is the presentation layer of a CALayer generated?

Posted by KJ on Stack Overflow See other posts from Stack Overflow or by KJ
Published on 2010-05-09T08:50:11Z Indexed on 2010/05/09 8:58 UTC
Read the original article Hit count: 608

Filed under:
|

Hi, I'm having difficulties animating my custom layer property using Core Anmiation.
My question is how the presentation of a CALayer is generated. Here is what I have now:

    @interface MyLayer : CALayer {
      NSMutableDictionary* customProperties;
    }

    @property (nonatomic, copy) NSMutableDictionary* customProperties;

    @end

And when I try to animate the key path "customProperties.roll" using CABasicAnimation and addAnimation:forKey:, it seems that the customProperties variable doesn't get copied from the model layer to the presentation layer, and the customProperties of the presentation layer appears to be nil, failing to update the value for the key "roll".
Is there a way to animate values in a dictionary correctly? What is the exact relationship between a model layer and a presentation layer while being animated?
Thanks!

© Stack Overflow or respective owner

Related posts about core-animation

Related posts about cocoa