Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Blakeasd

macrumors 6502a
Original poster
Dec 29, 2009
643
0
I am trying to get the Graphics Context from my Custom View and clear it. I know how to do it on the iPhone using
Code:
CGContextRef ctx = UIGraphicsGetCurrentContext();
    CGContextClearRect(ctx, rect);

I have been looking all over to find the equivalent to do this when programming for OS X. Does anyone know how to do this?

Thanks, Blake
 
Code:
CGContextRef ctx = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.