// Layer that I am using with round end
CAShapeLayer * energy = [CAShapeLayer layer];
energy.frame = CGRectMake(20.78, 205.34, 266.17, 230.29);
energy.lineCap = kCALineCapSquare;
energy.lineJoin = kCALineJoinRound;
energy.fillColor = nil;
energy.strokeColor = [UIColor colorWithRed:0.754 green: 0.832 blue:0.183 alpha:1].CGColor;
energy.lineWidth = 20;
energy.strokeEnd = 0;
energy.path = [self energyPath].CGPath;
[self.layer addSublayer:energy];
_energy = energy;
// Stroke drawing with the specific layer as a form of customized circle
- (UIBezierPath*)energyPath{
UIBezierPath *energyPath = [UIBezierPath bezierPath];
[energyPath moveToPoint:CGPointMake(0, 5)];
[energyPath addCurveToPoint:CGPointMake(150.639, 0.091) controlPoint1:CGPointMake(3.094, 0.091) controlPoint2:CGPointMake(147.602, -0.114)];
[energyPath addCurveToPoint:CGPointMake(266.168, 115.038) controlPoint1:CGPointMake(215.229, 4.442) controlPoint2:CGPointMake(266.168, 54.243)];
[energyPath addCurveToPoint:CGPointMake(141.441, 230.294) controlPoint1:CGPointMake(266.168, 178.692) controlPoint2:CGPointMake(210.325, 230.294)];
[energyPath addCurveToPoint:CGPointMake(16.757, 116.861) controlPoint1:CGPointMake(72.556, 230.294) controlPoint2:CGPointMake(16.757, 180.515)];
[energyPath addCurveToPoint:CGPointMake(16.615, 115.147) controlPoint1:CGPointMake(16.757, 114.621) controlPoint2:CGPointMake(16.615, 117.387)];
[energyPath addCurveToPoint:CGPointMake(16.615, 102.997) controlPoint1:CGPointMake(16.615, 113.206) controlPoint2:CGPointMake(16.543, 104.194)];
[energyPath addCurveToPoint:CGPointMake(16.736, 96.073) controlPoint1:CGPointMake(16.809, 99.79) controlPoint2:CGPointMake(16.736, 106.391)];
return energyPath;
}
我需要使用箭头结束图层描边结束动画。任何人都可以帮我做点什么。我设计了一个形状,结合了直线,圆形和最后一条直线。我正在使用笔划宽度为15的笔划结束,我正试图从左边开始,并且线条向另一端填充。但我需要在这个形状中添加箭形渐进