adding custom property to CAAnimation
* override copyWithZone:
@interface MyLayerAnimation : CABasicAnimation { MyItemLayer *relatedLayer; } @property (assign) __weak MyItemLayer *relatedLayer; @end @implementation MyLayerAnimation @synthesize relatedLayer; - (id)copyWithZone:(NSZone *)zone { MyLayerAnimation *newObj = [super copyWithZone:zone]; newObj.relatedLayer = self.relatedLayer; return newObj; } @end