标签:anim let omv rom double nbsp duration val osi
//动画为沿y轴旋转 let animation = CABasicAnimation(keyPath: "transform.rotation.y") animation.fromValue = 0 animation.toValue = Double.pi * 2 animation.repeatCount = Float.infinity animation.duration = 2 animatorView.layer.add(animation, forKey: "spin") //z轴td调大,防止旋转时被其他控件遮挡 animatorView.layer.zPosition = 100 //将view的tranform改为3d透视 var transform = CATransform3DIdentity transform.m34 = 1.0 / 500.0//透视度 animatorView.layer.transform = transform
标签:anim let omv rom double nbsp duration val osi
原文地址:https://www.cnblogs.com/liuyongfa/p/10042391.html