2
我試圖創建一個動畫之前跳的按鈕旋轉圖像,但圖像動畫前跳,也就是變成180度,並開始動畫CGAffineTransformRotate - 動畫
我的代碼:
@IBAction func switchListButtonClick(sender: UIButton) {
UIView.animateWithDuration(1) {
self.switchListButton.imageView?.transform = CGAffineTransformRotate((self.switchListButton.imageView?.transform)!, CGFloat(-M_PI_2))
}
}
我真的不知道爲什麼會發生這種情況?
請幫助我。