1
           [UIView animateWithDuration:3 delay:0 options:( UIViewAnimationOptionCurveEaseInOut |
                                                       UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat |
                                                       UIViewAnimationOptionAllowUserInteraction) animations:^{
            self.animatedImageView.transform = CGAffineTransformRotate(self.animatedImageView.transform, M_PI);
        } completion:^(BOOL finished){}];

加速と減速を繰り返しながら、このアニメーションを完全な円回転にする方法を教えてください。2 * M_PI を使用すると、アニメーションは動きません。

4

3 に答える 3

5
 [UIView animateWithDuration:3 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
            self.animatedImageView.transform = CGAffineTransformRotate(self.animatedImageView.transform, M_PI);
        } completion:^(BOOL finished){

        [UIView animateWithDuration:3 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
        self.animatedImageView.transform = CGAffineTransformRotate(self.animatedImageView.transform, (2*M_PI)-0.001); //  -0.001 will do the right way
    } completion:^(BOOL finished){}];


}];
于 2013-09-17T12:13:20.137 に答える
1

これはうまくいくはずです。アニメーションの種類を変更できます: UIViewAnimationTransitionFlipFromRight.

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:(UIViewAnimationTransitionFlipFromRight)
                       forView:Your_View cache:YES];
[UIView commitAnimations];
于 2015-08-24T07:52:45.333 に答える