Search code examples
ioscore-graphicscgcontext

How to clean a CGContextRef prior to drawing?


I have a CGContextRef with things drawn inside, and I want to clear it out so that it is empty (all transparent). How to do it?


Solution

  • CGContextClearRect should do the job.