1. Rotate view 180 degree
Code - let anticlockAnimation = CABasicAnimation(keyPath: "transform.rotation")
anticlockAnimation.fromValue = CGFloat.pi
anticlockAnimation.toValue = 0
anticlockAnimation.isAdditive = true
anticlockAnimation.duration = 3.0
self.imageview.layer.add(anticlockAnimation, forKey: "rotate")
self.imageview.transform = CGAffineTransform(rotationAngle: -CGFloat.pi)
2.
No comments:
Post a Comment