我无法在使用UIBezierPath创建的Arc上显示圆角.无论我是否设置kCGLineCapRound,它仍然是完美的平方.
此主题应该是一样的这一个,但是解决方案是行不通的.
这是我在viewWillAppear中的示例代码(仅用于测试目的):
int radius = 100;
CAShapeLayer *arc = [CAShapeLayer layer];
UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(100, 50) radius:radius startAngle:M_PI endAngle:M_PI/150 clockwise:YES];
path.lineCapStyle = kCGLineCapRound;
arc.path = path.CGPath;
arc.position = CGPointMake(CGRectGetMidX(self.view.frame)-radius, CGRectGetMidY(self.view.frame)-radius);
arc.fillColor = [UIColor clearColor].CGColor;
arc.strokeColor = [UIColor purpleColor].CGColor;
arc.lineWidth = 10.0f;
arc.cornerRadius = 3.0f;
Run Code Online (Sandbox Code Playgroud)
以下是它的外观:

我很无奈,所以我会感激任何帮助.多谢你们.