iphone - keeping the last frame of a frame animation visible
- by Mike
I have this code
UIImageView *sequence = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"balao_surge0.png"]];
NSMutableArray *array = [[NSMutableArray alloc] init] ;
for (int i=0; i<30; i++) {
UIImage *oneImage = [UIImage imageNamed:[NSString stringWithFormat:@"balao_surge%d.png",i]];
[array addObject:oneImage];
}
sequence.animationImages = array;
sequence.animationDuration = 2.0;
sequence.animationRepeatCount = 1;
[umaVista addSubview:sequence];
[sequence release];
sequence.startAnimating;
The animation plays fine, but after the last frame is shown, it vanishes.
I would like to make it stay visible, that is, make the animation stop on the last frame.
Is there any way to do that?
thanks for any help.