Я пытаюсь запустить эту анимацию, которая работает нормально, но я хочу, чтобы последний номер оставался на экране. в настоящее время он проходит через массив, а затем исчезает .. есть ли в любом случае, чтобы остановить анимацию на число, которое передается в?
- (void)playAnimationToNumber:(int)number{
NSMutableArray *imagesForAnimation = [[NSMutableArray alloc] initWithCapacity:0];
for (int counter=1; counter<=number; counter++) {
NSString *imageNameForFirstNumber = [NSString stringWithFormat:@"Flap%i.png", counter];
[imagesForAnimation addObject:[UIImage imageNamed:@"FlapMoving1.png"]];
[imagesForAnimation addObject:[UIImage imageNamed:@"FlapMoving2.png"]];
[imagesForAnimation addObject:[UIImage imageNamed:imageNameForFirstNumber]];
}
animationArray.animationImages = [NSArray arrayWithArray:imagesForAnimation];
animationArray.animationDuration = 1.2;
animationArray.animationRepeatCount = 1;
[animationArray startAnimating];
[self.view addSubview:animationArray];
[imagesForAnimation release];
}