I have a frame by frame animation but it is causing my iPad to crash. There are actually a few animations, located in different view controllers, and they work but after a while of switching between them it will crash the app. I think it could be a memory issue that I need to release name, image and array after the animation, but how do I do that?
-(void)viewDidLoad{
NSMutableArray *array = [NSMutableArray arrayWithCapacity:35];
for (int i = 0; i < 35; ++i) {
NSString *name = [NSString stringWithFormat:@"ivf1_000%d.png",i];
UIImage *image = [UIImage imageNamed:name];
[array addObject:image];
}
graphanimation.animationImages = array;
graphanimation.animationDuration = 2;
graphanimation.animationRepeatCount = 1;
[graphanimation startAnimating];
[super viewDidLoad];
}