0
我正在嘗試製作iPhone/iPad應用程序,並且我正在嘗試讓圖像慢慢旋轉360度。但是,當我增加動畫持續時間時,圖片將以1/4的方式旋轉,然後重置回動畫的開頭。平滑器慢速旋轉UIImage
有誰能告訴我這有什麼問題嗎?
我有什麼至今:
CABasicAnimation *fullRotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
[fullRotation setFromValue:[NSNumber numberWithFloat:0]];
[fullRotation setToValue:[NSNumber numberWithFloat:((2*M_PI))]];
fullRotation.speed = .5f;
fullRotation.duration = 5.5;
fullRotation.repeatCount = 1;
fullRotation.repeatCount = HUGE_VALF;
[[cosmic layer] addAnimation:fullRotation forKey:@"transform.rotation"];
總結一下,我只是試圖做一個平穩的連續旋轉沒有任何暫停。 –