UIBezierPath *path = [UIBezierPath bezierPath];
[path moveToPoint:CGPointMake(0, 0)];
[path addLineToPoint:CGPointMake(self.width-30, 0)];
_shapeLine = [CAShapeLayer layer];
_shapeLine.frame = CGRectMake(15, self.bottom - 1, self.width-30, 0.5);
_shapeLine.lineJoin = kCALineJoinRound;
_shapeLine.lineDashPattern = @[@(5),@(5)];
_shapeLine.fillColor = [UIColor clearColor].CGColor;
_shapeLine.strokeColor = kCYTCardLineColor.CGColor;
_shapeLine.path = path.CGPath;
[self.layer addSublayer:_shapeLine];
网友评论