Swift/Objective c - rotate/spin CAShapeLayer on the spot -
I'm trying to animate / spin a circle around I have to try, but full Moving on the screen .. I do not need to move it, I need to spin at the place Let's Circle Layer: CashPlayer! \ Method out
vlet rotate = CABasic animation (Home: "transform.rotation.z") rotate.fromValue = float (0.0) Gumaagiktol = float (2.0 * M_PI) rotate Rotate .duration = 1.0. Revolution = true is rotate.repeatCount = 1 rotate.removedOncompletion = false rotate.fillMode = kCAFillModeForward Circle Layer. AddAnimation (rotate for: to "transform.rotation.z": "transform.rotation.z")
Any idea why running and spinning / rotating on the spot to do?
solution found, I just rotate the same scene with different animation:
UIView.animateWithDuration (0.95, delay: 0.0 options: UIViewAnimationOptionskCurveLinear, Animation: {() - & gt; zero self .circleView.transform = CGAffineTransformMakeRotation (self.sumer)}, perfection: zero)
Enjoy
Comments
Post a Comment