Im new to X-code and have been searching everywhere and trying "everything" with no luck. If you can help me I will sing you a song :)
Im making an IPad app that uses a lot of memory. The size of the project is about 100mb (many images) but the Activity monitor shows that Im using up to 140mb "real memory" after Ive switched between all the views (xib-files) :(
My memory footprint increases every time I switch between views (xib files). ARC is enabled so I can't release the previous view from memory. I have 10 pages (xib files) to switch between.
Im using this code to switch between the xib-files:
viewController2 *view2 = [[viewController2 alloc] initWithNibName:@"viewController2" bundle:nil];
view2.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:view2 animated:YES];
When I switch back or to the next view, I use the same kind of code.
Ive tried using [self dismissModalViewControllerAnimated:NO];
, [self.view removeFromSuperview];
, self.view = nil;
but the memory keeps increasing.
As I understand it the views are stacked on top of each other causing the memory to increase.
How can I switch to the next view (xib-file) and at the same time kill the memory usage of my first view?
This problem has made me pull all my hair out :(