动画像心电图的图像

时间:2012-07-25 04:50:16

标签: iphone animation

我有一张图片enter image description here

我想连续动画这个图像,即从屏幕的左端进入并在右端退出,因为我正在使用此代码..

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:15];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:NO];
cardioImage1.frame = CGRectMake(330, 0, 320, 100);
[UIView commitAnimations]; 

此代码仅为图像设置动画一次。

我想让它在特定的时间范围内连续动画。 我能做些什么......请帮助我。 提前谢谢。

1 个答案:

答案 0 :(得分:1)

您需要为此属性设置一些值: setAnimationRepeatCount

也许使用FLT_MAX进行无限循环