0

我试图让 UIImage 有轻微的摆动效果。

[UIView setAnimationDelegate:self];
            [UIView setAnimationDidStopSelector:@selector(endSwipeAnimation)];
            [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
            [UIView setAnimationRepeatCount:10];
            [myImage setAlpha:1.0];
            [myImage setAlpha:0.7];

            [UIView setAnimationRepeatAutoreverses:NO];

          [UIView commitAnimations];

任何想法如何做到这一点?

提前致谢

4

2 回答 2

1

在动画之间写下你想要的新效果或改变。

首先将 imageView alpha 值设置为 1,然后将其 alpha 值更改为 0.5 或任何你想要的动画。

于 2012-11-28T12:31:02.437 回答
0
[UIView beginAnimations:animationID context:context];
[UIView setAnimationDuration:duration];

缺失... ?

于 2011-01-27T11:35:15.823 回答