tags:

views:

465

answers:

1

Please help me ! i make an app like a slide show with back, previous button to change Image one by one. But when i using large image it crash. Now i,m using 64 jpg pics , size~20kb/1pic.

help me or i die ! (U can add nick hoangtuanfithou, please) code like that :

//Init Image Array -(void)InitImageArray1 { myAnimationImages1 = [[NSMutableArray alloc] init];

for ( int i = 0; i < 24; i++ ) { NSAutoreleasePool *poolArray=[[NSAutoreleasePool alloc] init];

NSString *fileName = [NSString stringWithFormat:@"001 (%d)",i]; image = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:fileName ofType:@”jpg”]];

[myAnimationImages1 addObject:image]; [poolArray release]; }

}

//Change Image self.mainImage.image = [self.myAnimationImages1 objectAtIndex:animationImageArrIndex];

A: 

see page control sample of apple,or see scrolling madness available at github.

Rahul Vyas