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];