View Full Version : Pop all views of the stack

May 23, 2011, 03:12 PM
Hi all,

I am trying to figure out how to pop all views except for the rootview off the stack so my app. I don't know how many views there will be as it could either be none, one or two that need to be removed. Is there an easy meathid to do this?

I already know how to pop one view.

May 23, 2011, 03:19 PM
Look at the Class Reference for UINavigationController (http://developer.apple.com/library/ios/#documentation/uikit/reference/UINavigationController_Class/Reference/Reference.html). There is an instance method specifically for this.

May 23, 2011, 03:34 PM
Thanks, feel doppy now, lack of sleep is a terrible thing :S