uiimage动画效果

时间:2011-01-27 11:27:31

标签: iphone uiimage uianimation

我试图让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];

任何想法如何实现这一目标?

提前致谢

2 个答案:

答案 0 :(得分:1)

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

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

答案 1 :(得分:0)

[UIView beginAnimations:animationID context:context];
[UIView setAnimationDuration:duration];

缺少......?