I am trying to clear the currently drawn image on the cgcontext
cgcontext, image, iphone-sdk-3.0
Solution
try this one, it works for me: CGContextClearRect(UIGraphicsGetCurrentContext(), rect);
Problem
I have drawn a uiimage on a cgcontext CGContextDrawImage(tempContext, CGRectMake(0,0,myRect.size.width,myRect.size.height), imgRef); but once user is done with the current image, i want to clear the tempContext so that I can rescale / manipulate the image and redraw it on the same context. for this i want to clear the the context and make it clean. I tried CgContextClearRect but it didn't worked :(