Save previous context
- by Ann
I use CALayers and I`ve override this delegate
-(void)drawLayer:(CALayer*)layer inContext:(CGContextRef)context
{
//draw some rectangle depends on some custom parameters
}
Then I want to add to this layer another rectangle. And when I call
[layer setNeedsDisplay]
I expect to see 2 different rectangles in layer but I see only last added rectangle.
So please advice me how can I do what I want.
Thank you in advance.