Endless Drilling with UINavigationController
Never did this ... I would like to approach this by keeping a stack with a lightweight object containing the contents of the previous view (maybe just a URL?). Instead of just clicking on the new UIViewController on the UINavigationController, you would populate your current one, no animation, and then click on the new view. However, I don't think this would handle the nice animation properly.
Another way that comes to mind is to manipulate the viewControllers array from the UINavigationController. After clicking on the new view, simply remove the previous view from the array. Thus, there will only be one or two items on the UINavigationController stack. Hitting the back button would create the correct view, insert it into the viewControllers array, and then pull the current one. Your state will be managed with a simple object stack, not supercomputers.
-dan
a source to share
UINavigationController
intended to be used in this way. If memory becomes an issue, the navigation controller throws out the hidden views and reloads them when it's time to jump back onto the stack. Apple recommends you download UIView
from the NIB for this reason.
Scroll down to # 4, "Set up a view for your root view controller."
a source to share