iphone - keeping the last frame of a frame animation visible

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-04-03T22:14:13Z Indexed on 2010/04/03 22:23 UTC
Read the original article Hit count: 692

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk