开发者

How is the presentation layer of a CALayer generated?

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 present开发者_高级运维ation 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!


Override the initWithLayer: method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜