Quote:
Originally Posted by smasher
Were you calling "imageWithContentsofFile" every frame? You probably need to load your images into an array at startup, and then reference them each frame without recreating them.
"imageNamed" is faster when you recreate the same image over and over, but you should not need to recreate them over and over; also imageNamed uses more memory (to cache the images.)
Also, how big are the images? If they are full-screen you'll probably only get about 20 images loaded at once before you run out of memory.
|
Thanks for reply,
i am not recreating the images, i have stored in a NSMutable Array and using index of that Array,
Code:
- (void) initImages{
XImg = [UIImage imageNamed:@"X.png"];
[Xmages addObject:XImg ];
// 33 times
}
- (void) XImage{
Ximageview.image = [Xmages objectAtIndex:XImageCount];
XImageCount++;
if(XImageCount>=33){
XImageCount=0;
}
}
above all 33 image covers 70% of iPhone screen.
if i compress the png file, will it create any dfference?
