iOS 画圆形

+(void)drawEllipse:(CGPoint)point withColor:(UIColor*)color withRad:(float)rad
{
    CGContextRef ctx = UIGraphicsGetCurrentContext();
    CGContextSetFillColorWithColor(ctx, [color CGColor]);
    CGContextFillEllipseInRect(ctx, CGRectMake(point.x-rad, point.y-rad, 2*rad, 2*rad));
}

直接调用传入参数就能够了code

相关文章
相关标签/搜索