CABasicAnimation是否随着swift改变了?或者这是一个错误?
认为这很奇怪,考虑到我只是在尝试存档项目时遇到此错误,而不是在通过设备或模拟器运行时...
var animation = CABasicAnimation(keyPath: "strokeEnd")
animation.fromValue = self.progress == 0 ? 0 : nil
let progressNew = Float(progress)
animation.toValue = NSNumber.numberWithFloat(progressNew)
animation.duration = 1
self.progressLayer.strokeEnd = progress
self.progressLayer.addAnimation(animation, forKey: "animation")