Reputation: 263
I am trying to draw a circle using the following code.
-(void)drawRect
{
CGContextRef contextRef = UIGraphicsGetCurrentContext();
CGContextSetRGBFillColor(contextRef,1,0,0,1);
CGContextFillEllipseInRect(contextRef, self.frame);
}
I am getting my circle as expected, but at the edges of the circle truncated/interrupted. How can I solve this problem?
Upvotes: 0
Views: 987
Reputation: 387
Try using self.bounds instead of self.frame. What class are you subclassing? Maybe you have to use self.view.bounds or self.view.frame ?
Upvotes: 1