為什么這樣寫只轉(zhuǎn)一次?
UIView.animateKeyframesWithDuration(2, delay: 0, options: nil, animations: {
? ? ? ?self.greenSquare.transform = CGAffineTransformRotate(self.greenSquare.transform, CGFloat(M_PI))
? ? ? ? ? ?}, completion: {(finished) -> Void in {
? ? ? ? ? ? ? ?self.spin()
? ? ? ? ? ? ? ?}})
2015-05-18
animateKeyframesWithDuration是在spin方法里面嗎?
2015-05-28
為什么你的CGFloat(M_PI)沒問題??!
2015-05-15
@懶得理你 keyframes是關(guān)鍵幀,你是不是打錯了?還有老師的函數(shù)中調(diào)用自身函數(shù)是一個遞歸。 option中有repeat也是可以重復(fù)的。只轉(zhuǎn)一次是因為函數(shù)只調(diào)用了一次啊。