Swift--图片旋转动画
// 创建动画 let anim = CABasicAnimation(keyPath: "transform.rotation") // 设置动画属性 anim.toValue = 2 * M_PI anim.repeatCount = MAXFLOAT anim.duration = 10 anim.removedOnCompletion = false // 将动画添加到图层上 imageView.layer.addAnimation(anim, forKey: nil)