I seem to be having some trouble finding the answer to this one.
My Application loads view controllers using this code:
World_Pick *world_pick = [[World_Pick alloc] initWithNibName:@"World Pick"
bundle:nil];
world_pick.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:world_pick animated:YES];
[world_pick release];
The problem is the previous view isnt being released from memory, and just adding on to it. I have tried stuff like
[self.view removeFromSubview];
[viewController release];
ViewController = nil;
None of which seem to work. Could someone help me?
Thanks
If I understand correctly what you mean, I would say that it is normal, when you present a view controller modally that the underlying view controller is not removed and the view remains there. This is how modal view controllers are presented asa far as I know.
I don´t know what UI you are trying to build into your app, but maybe you should look into using a
UINavigationControlleror, possibly, just adding/removing your views to a base view as need arise. This is of course just a guess, I don´t know what you are trying to do but if you provide more detail, I can help further.