我做一个application.In是我做动画的UIImageView显示像下面如何做动画的UIImageView并停止剩余过程
UIImageView * fearthersanimate = nil;
[fearthersanimate setCenter:sender.center];
fearthersanimate = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 120,200)];
[fearthersanimate setCenter:CGPointMake(sender.center.x, sender.center.y)];
fearthersanimate .animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"water_can_1.png"],
[UIImage imageNamed:@"water_can_2.png"],[UIImage imageNamed:@"water_can_3.png"],
[UIImage imageNamed:@"water_can_4.png"],[UIImage imageNamed:@"water_can_5.png"],
[UIImage imageNamed:@"water_can_6.png"],[UIImage imageNamed:@"water_can_7.png"],
[UIImage imageNamed:@"water_can_8.png"],
nil];
fearthersanimate.animationDuration = 1.0f;
fearthersanimate.animationRepeatCount = 1;
[self.view addSubview: fearthersanimate];
[fearthersanimate startAnimating];
不同的形象,但其余操作开始之前但是我需要先做这个动画,直到我需要停止剩下的过程。