看过iOS动画之旅的都知道,其中在最后提到一个作者写的开源动画库EasyAnimation(以下简称EA).
EA对CoreAnimation中的view和layer动画做了更高层次的包装和抽象,使得我们可以大大减少编写代码的行数.
不过在玩耍EA时发现了点小问题,在使用链式串行调用中其中的某一段若为弹簧动画,则该动画后面的其他动画都无法再运行了.
以下是测试代码:
@IBAction func actionAddItem(sender: AnyObject) {
plusButton.enabled = false
UIView.animateAndChainWithDuration(1.0, delay: 0.0, usingSpringWithDamping: 0.33, initialSpringVelocity: 0.0, options: [], animations: {
//1
self.plusButton.transform = CGAffineTransformRotate(self.plusButton.transfo