Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let path = UIBezierPath()
- path.move(to: CGPoint(x: xPos, y: yPos))
- path.addLine(to: CGPoint(x: scrollView.frame.size.width, y: yPos))
- let lineLayer = CAShapeLayer()
- lineLayer.path = path.cgPath
- lineLayer.lineWidth = 0.5
- if lineInfo["dashed"] as! Bool {
- lineLayer.lineDashPattern = [4, 4]
- }
- lineLayer.strokeColor = #colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1).cgColor
- self.layer.insertSublayer(lineLayer, at: 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement