Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. let path = UIBezierPath()
  2. path.move(to: CGPoint(x: xPos, y: yPos))
  3. path.addLine(to: CGPoint(x: scrollView.frame.size.width, y: yPos))
  4.  
  5. let lineLayer = CAShapeLayer()
  6. lineLayer.path = path.cgPath
  7. lineLayer.lineWidth = 0.5
  8. if lineInfo["dashed"] as! Bool {
  9. lineLayer.lineDashPattern = [4, 4]
  10. }
  11. lineLayer.strokeColor = #colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1).cgColor
  12. self.layer.insertSublayer(lineLayer, at: 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement