【发布时间】:2015-05-27 10:07:25
【问题描述】:
我正在使用 UIBezierPath 来画一个圆圈
UIBezierPath *outerPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(heigth/2.0f, heigth/2.0f)
radius:(self.frame.size.height * 0.5)
startAngle:DEGREES_TO_RADIANS(-90)
endAngle:DEGREES_TO_RADIANS(270)
clockwise:YES];
outerCircleLayer = [CAShapeLayer layer];
outerCircleLayer.lineCap = kCALineCapRound;
outerCircleLayer.lineWidth = 1.0f;
outerCircleLayer.strokeColor = HexRGB(0x4cae7b).CGColor;
outerCircleLayer.fillColor = [[UIColor clearColor] CGColor];
outerCircleLayer.path = outerPath.CGPath;
outerCircleLayer.strokeEnd = 0;
但我发现圆圈并不完美,如下所示
我该怎么办?
更新:
更新一张图,从这里我们可以发现起点和终点不平滑。
【问题讨论】:
-
圆圈有什么问题? (画质差到分不清是形状还是角度还是别的什么问题)
-
@DavidRönnqvist 增加规模时更容易发现问题,就像stackoverflow.com/questions/29063680/…一样的问题
-
@Rick 你找到解决办法了吗?
-
@DianaProdan 抱歉,我的问题仍然存在
标签: ios uikit uibezierpath