UIView动画块中的360度动画永远不会启动

时间:2011-07-23 17:10:20

标签: cocoa-touch animation objective-c-blocks

    [UIView animateWithDuration:1.0
                      delay: 0.0
                    options: UIViewAnimationOptionAllowUserInteraction | UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionRepeat
                 animations:^{
                     self.circle.transform = CGAffineTransformMakeRotation(M_PI * 2.0f);
                 }
                 completion:^(BOOL finished){

                 }];

这个动画永远不会开始。我用于弧度角的任何数字看起来似乎Cocoa有点'太聪明了'并且在最近的PI内或者如上所述将其舍入,决定不需要动画,因为开始和结束角度是相同的360 = 0度。因此,即使我尝试做359度,圆圈也只是按照顺时针方向旋转1度,而不是完全旋转1度。

如何对视图进行简单的连续360度旋转?

提前致谢:)

0 个答案:

没有答案