I am trying to make a simple app where you touch a point, and a sprite follows a line through that point to the edge of the screen, no matter where you touch. I want to draw lin
For Swift 3, the CGPathMoveToPoint method doesn't like a nil for the second argument anymore, so I needed a new solution. Here's what I came up with:
CGPathMoveToPoint
nil
let line_path:CGMutablePath = CGMutablePath() line_path.move(to: CGPoint(x:x1, y:y1)) line_path.addLine(to: CGPoint(x:x2, y:y2))