1. CGPathMoveToPoint’ is unavailable: Use move(to:transform:) 2. ‘CGPathAddLineToPoint’ is unavailable: Use addLine(to:transform:)

Try this:

    let path = CGMutablePath()
    path.move(to: CGPoint(x: lineFrame.midX, y: lineFrame.midY))
    path.addLine(to: CGPoint(x: lineFrame.origin.x + lineFrame.width / 2, y: lineFrame.origin.y))

And check the latest reference of CGMutablePath:

CGMutablePath

Leave a Comment