我想在特定的时间内制作动画。我的代码如下:动画在逝去动画后继续
- (void)animate{
NSArray *myImages = [[NSArray alloc] initWithObjects:
[UIImage imageNamed:@"01.png"],
[UIImage imageNamed:@"02.png"],
[UIImage imageNamed:@"03.png"],
[UIImage imageNamed:@"04.png"],
[UIImage imageNamed:@"05.png"],
[UIImage imageNamed:@"06.png"],
[UIImage imageNamed:@"07.png"],
[UIImage imageNamed:@"08.png"],
[UIImage imageNamed:@"09.png"],
[UIImage imageNamed:@"10.png"],
[UIImage imageNamed:@"11.png"],
[UIImage imageNamed:@"12.png"],
[UIImage imageNamed:@"13.png"],
nil];
faceImage.animationImages = myImages;
faceImage.animationDuration = 4.0;
faceImage.animationRepeatCount = 4;
[faceImage startAnimating];
}
现在问题流逝animationDuration后,animationRepeatCount持续几秒钟!但是我想在4秒内制作我的animationRepeatCount。 4秒后我的动画应该停止!我在做我的代码有什么问题?或者,我该如何解决这个问题?
所以你可以使动画持续时间为1 – Impossible 2013-05-07 07:03:09
这应该需要16秒,每次重复序列4秒。这些都在文档中。 – rdelmar 2013-05-07 07:05:24
因此,根据@ rdelmar和你的要求,你可以这样做:faceImage.animationDuration = 1.0; faceImage.animationRepeatCount = 4; – Amit 2013-05-07 07:10:24