嗨,在我的应用程序中,我必须在视图上画一个圆圈。为此我使用了下面的代码
CGContextRef contextRef = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(contextRef, 2.0);
CGContextSetRGBStrokeColor(contextRef,red,green,blue, 1.0);
CGRect circlePoint = (CGRectMake(rect.origin.x,rect.origin.y,rect.size.width,rect.size.height));
CGContextStrokeEllipseInRect(contextRef, circlePoint);
我也得到了圆圈,但我以这种方式得到了圆圈
如果有人有任何想法,请告诉我。提前谢谢请帮忙。