Rotate UIButton 360 degrees
问题 I've been trying to run an animation that rotates my UIButton 360 degrees using this code: UIView.animateWithDuration(3.0, animations: { self.vineTimeCapButton.transform = CGAffineTransformMakeRotation(CGFloat(M_PI*2)) self.instagramTimeCapButton.transform = CGAffineTransformMakeRotation(CGFloat(M_PI*2)) }) However, it doesn't rotate 360 degrees because the UIButton is already at that location. How can I rotate my UIButton 360 degrees? 回答1: You can use a trick: start rotating with 180 degrees