мой код Безеропата
CGFloat deltaX = lineChartPoint.x - previousLineChartPoint.x;
CGFloat controlPointX = previousLineChartPoint.x + (deltaX / 2);
CGPoint controlPoint1 = CGPointMake(controlPointX, previousLineChartPoint.y);
CGPoint controlPoint2 = CGPointMake(controlPointX, lineChartPoint.y);
[bezierPath addCurveToPoint:CGPointMake(lineChartPoint.x, lineChartPoint.y) controlPoint1:controlPoint1 controlPoint2:controlPoint2];
мой код градиента слоя
self.gradientLayer = [CAGradientLayer layer];
self.gradientLayer.frame = CGRectMake(kVPadding, 0, CGRectGetWidth(self.bounds) - 2 * kVPadding, CGRectGetHeight(self.bounds));
self.gradientLayer.colors = @[(__bridge id)[UIColor colorWithHex:0x8362FC alpha:0.9].CGColor,(__bridge id)[UIColor colorWithHex:0x517DF7 alpha:0.1].CGColor];
self.gradientLayer.locations=@[@0.0,@1.0];
self.gradientLayer.startPoint = CGPointMake(0.0,0.0);
self.gradientLayer.endPoint = CGPointMake(0.0,1);
[self.layer addSublayer:self.gradientLayer];
self.gradientShapeLayer = [[CAShapeLayer alloc] init];
self.gradientLayer.mask = self.gradientShapeLayer;
self.gradientShapeLayer.path = bezierPath.CGPath;
@ Dragonviousts