0
我使用此代码画一个圆圈内的形状:绘制一个UIImageView IOS
CGContextRef contextRef = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(contextRef, 2.0);
CGContextSetStrokeColorWithColor(contextRef, [color CGColor]);
CGRect circlePoint = (CGRectMake(coordsFinal.x, coordsFinal.y, 50.0, 50.0));
CGContextStrokeEllipseInRect(contextRef, circlePoint);
圆是我的UIWindow添加,但我希望它在一个UIImageView添加,保持相同的坐标UIWindow,所以如果坐标超出了UIImageView的大小,圆圈将不会被看到。在UIImageView中,在视图上简单地绘制圆。