Reputation: 313
I am attempting to convert my Swift 2 code into the latest syntax(Swift 3). I am receiving the following error:
Nil is not compatible with expected argument type 'UnsafePointer'
(Swift 2 Code)
CGPathAddArc(path, nil, overlayView.frame.width - radius/2 - xOffset, yOffset, radius, 0.0, 2 * 3.14, false)
Can someone please help me resolve this conversion syntax issue?
Upvotes: 2
Views: 1232
Reputation: 2197
path.addArc(withCenter: CGPoint(x: overlayView.frame.width - radius/2 - xOffset, y: yOffset),
radius: radius,
startAngle: 0,
endAngle: CGFloat(M_PI) * 2,
clockwise: false)
Upvotes: 5