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!
The presentation layer is responsible for presenting the data to the application layer. This may include some form of format or character translation. This guarantees a common representation of the data while in transit.
A CALayer is a layer in the composition stack which goes on top of some layers, and potentially underneath other layers.
Layers are often used to provide the backing store for views but can also be used without a view to display content. A layer's main job is to manage the visual content that you provide but the layer itself has visual attributes that can be set, such as a background color, border, and shadow.
Override the initWithLayer:
method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With