I\'ve been trying to run an animation that rotates my UIButton 360 degrees using this code:
UIButton
UIView.animateWithDuration(3.0, animations: { self.vin
Swift 5. Try this, it worked for me
UIView.animate(withDuration: 3) { self.yourButton.transform = CGAffineTransform(rotationAngle: .pi) self.yourButton.transform = CGAffineTransform(rotationAngle: .pi * 2) }