Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. let arrowView = ArrowView()
  2. arrowView.frame = CGRect(x: selectButton.frame.minX, y: selectButton.frame.maxY, width: selectButton.frame.width, height: processButton.frame.minY - selectButton.frame.maxY)
  3. arrowView.backgroundColor = UIColor.white
  4. arrowView.viewWithTag(100)
  5. view.addSubview(arrowView)
  6.  
  7. let arrowPath = UIBezierPath.bezierPathWithArrowFromPoint(startPoint: startPoint, endPoint: endPoint, tailWidth: 4, headWidth: 8, headLength: 6)
  8. // Only override draw() if you perform custom drawing.
  9. // An empty implementation adversely affects performance during animation.
  10. override func draw(_ rect: CGRect) {
  11. let fillColor = UIColor.white
  12. fillColor.setFill()
  13.  
  14. arrowPath.lineWidth = 1.0
  15. let strokeColor = UIColor.blue
  16. strokeColor.setStroke()
  17.  
  18. arrowPath.stroke()
  19. arrowPath.fill()
  20. }
  21.  
  22. private var startPoint: CGPoint {
  23. return CGPoint(x: bounds.midX, y: bounds.minY)
  24. }
  25. private var endPoint: CGPoint {
  26. return CGPoint(x: bounds.midX, y: bounds.maxY)
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement