我有一个使用CALayer对象设置的进度View的相对直接的实现。进度View本身是UIView的subview。这是设置进度环的代码:self.progressRingLayer=CAShapeLayer()letinnerRect=CGRectInset(bounds,CGFloat(self.lineWidth)/2,CGFloat(self.lineWidth)/2)letinnerPath=UIBezierPath(ovalInRect:innerRect)self.progressRingLayer.path=innerPath.CGPathself.progressRin