Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let arrowView = ArrowView()
- arrowView.frame = CGRect(x: selectButton.frame.minX, y: selectButton.frame.maxY, width: selectButton.frame.width, height: processButton.frame.minY - selectButton.frame.maxY)
- arrowView.backgroundColor = UIColor.white
- arrowView.viewWithTag(100)
- view.addSubview(arrowView)
- let arrowPath = UIBezierPath.bezierPathWithArrowFromPoint(startPoint: startPoint, endPoint: endPoint, tailWidth: 4, headWidth: 8, headLength: 6)
- // Only override draw() if you perform custom drawing.
- // An empty implementation adversely affects performance during animation.
- override func draw(_ rect: CGRect) {
- let fillColor = UIColor.white
- fillColor.setFill()
- arrowPath.lineWidth = 1.0
- let strokeColor = UIColor.blue
- strokeColor.setStroke()
- arrowPath.stroke()
- arrowPath.fill()
- }
- private var startPoint: CGPoint {
- return CGPoint(x: bounds.midX, y: bounds.minY)
- }
- private var endPoint: CGPoint {
- return CGPoint(x: bounds.midX, y: bounds.maxY)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement