tags:

views:

30

answers:

1

Hi,

I've been using the code below to draw on an UIView

CGContextRef context = UIGraphicsGetCurrentContext(); 
CGContextSetStrokeColorWithColor(context, [UIColor blueColor].CGColor);
CGContextSetRGBFillColor(context, 0.0, 0.0, 1.0, 1.0);
CGContextSetAlpha(context, 0.5);
CGContextSetLineWidth(context, 10.0);
CGContextMoveToPoint(context, point.x, point.y);
CGContextAddLineToPoint(context, point.x, point.y);
CGContextStrokePath(context);

So that part works.
Now how do I clear my drawing? Most of the example just shows the drawing. Having a hardtime finding keyword to google.

Thanks,
Tee

+1  A: 

Have you tried CGContextClearRect?

imaginaryboy