CABasicAnimation没有名为duration的成员:xcode beta 4

时间:2014-07-24 08:15:27

标签: ios xcode swift

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")

0 个答案:

没有答案