我只是将我的CGContextAddArc更改为addArc,现在我收到此错误:
No '/' candidates produce the expected contextual result type 'CGPoint'
以下是代码:
context?.addArc(center: (frame.size.width)/2, radius: frame.size.height/2, startAngle: (frame.size.width - 10)/2, endAngle: CGFloat(M_PI * 2.0), clockwise: 1)
我需要做些什么调整才能让它发挥作用?
答案 0 :(得分:2)
您只是传递CGFloat
,center
期待CGPoint
e.g。
context?.addArc(center: CGPoint(x: frame.size.width/2, y: frame.size.height/2) ...