//inside init
_color = [UIColor orangeColor];
self.backgroundColor = [UIColor clearColor];
self.clearsContextBeforeDrawing = NO;
//inside drawRect
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSaveGState(ctx);
CGContextAddEllipseInRect(ctx, rect);
CGContextSetFillColorWithColor(ctx,
_color.CGColor);
CGContextFillPath(ctx);
CGContextRestoreGState(ctx);
The background keeps showing up as white rather then transparent. The ellipse also does not change color and shows up as black. Thank in advance to anyone who takes a look.