Swift conversion: ERROR - CGPathAddArc

2019-07-25 13:42发布

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?

标签: ios swift swift3
1条回答
叛逆
2楼-- · 2019-07-25 14:43
    path.addArc(withCenter: CGPoint(x: overlayView.frame.width - radius/2 - xOffset, y: yOffset),
                radius: radius,
                startAngle: 0,
                endAngle: CGFloat(M_PI) * 2,
                clockwise: false)
查看更多
登录 后发表回答