我在Swift中编码。我正在写一个Mac OS应用程序。我已经创建了一个NSBezierPath,现在我想将它添加到我的图层(CALayer)?你是怎么做到的?
let myShape = NSBezierPath()
myShape.appendBezierPathWithArcWithCenter(centrePoint, radius: 150, startAngle: CGFloat(270.0 + CGFloat(testTasksArr.indexOf(task)! + 1)), endAngle: CGFloat(270.0 + CGFloat(testTasksArr.indexOf(task)! + 1) + CGFloat(360/testTasksArr.count)), clockwise: true)
myButtonLayer.path = myShape
最后一行无效,value of type CALayer has no member path