Save previous context

Posted by Ann on Stack Overflow See other posts from Stack Overflow or by Ann
Published on 2010-04-04T22:04:18Z Indexed on 2010/04/04 22:13 UTC
Read the original article Hit count: 305

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk