CAShapeLayer *border = [CAShapeLayer layer];
//線的顏色
border.strokeColor = LineColor.CGColor;
border.fillColor = nil;
border.path = [UIBezierPath bezierPathWithRect:_dotLineView.bounds].CGPath;
border.lineWidth = 1.f;
border.lineCap = @"square";
//4是線的寬度? 3是每條線的間距
border.lineDashPattern = @[@4, @3];
[_dotLineView.layer addSublayer:border];