I have an iPad app that has linear navigation with a Navi开发者_开发百科gation Controller. I am pushing View Controllers one at a time with gestures. I also have a PopOverController menu that can push View Controllers. Trouble is, when I push more than 20 it crashes.
Do I have to manually remove View Controllers from the stack after I get above a certain number? I was under the impression that the Navigation Controller would remove hidden View Controllers automatically.
Many thanks in advance.
If you're allocating too much memory use the viewDidUnload to release objects you won't use while the view is not presented again. You can restore then in the viewDidLoad as well.
Try releasing all the controllers after you push them onto the stack and also try releasing the navigation controller. Hope this helps
精彩评论