, , . , , . , , , .xib. Infact, - , .
It’s actually very easy to understand why (I was surprised when I heard). Basically, every thing in a .xib file is an object. When you have many objects, you run out of memory. What you need to do is run a code similar to the following when changing pages.
- (void) changeToPageOne {
[theSecondElement release];
UIImageView *theElement = [[UIImageView alloc] initWithFrame:(CGRect)];
[theElement setImage:(UIImage*)];
[theView addSubview:theElement];
}
You do the same for the next page. The problem here is that you will need to track the UIImageView, but basically it is a local variable. You can add it to the array and simply delete the objects in the array when changing pages. Hope this helps!
source
share