By Writing the First Line you get the Indexes of all View Controllers and from second Line You will reach up to your Destination.
NSArray *array = [self.navigationController viewControllers];
[self.navigationController popToViewController:[array objectAtIndex:2] animated:YES];
More Related Contents:
- SplitView like Facebook app on iPhone
- Custom Animation for Pushing a UIViewController
- Removing viewcontrollers from navigation stack
- How can I pop a view from a UINavigationController and replace it with another in one operation?
- Prevent a UISearchDisplayController from hiding the navigation bar
- How to add a right button to a UINavigationController?
- How to set the text of a back button on a UINavigationBar? [duplicate]
- How to subclass UINavigationBar for a UINavigationController programmatically?
- UINavigationController Force Rotate
- Prevent automatic popToRootViewController on double-tap of UITabBarController
- iPhone UINavigation Issue – nested push animation can result in corrupted navigation bar
- self.title sets navigationController and tabBarItem’s title? Why?
- iPhone – UIImagePickerControllerDelegate inheritance
- How to resize Title in a navigation bar dynamically
- how to hide navigationbar when i push from navigation controller?
- Push ViewController from Right To Left with UINavigationController
- “Unbalanced calls to begin/end appearance transitions” warning when push a view in a modal way in XCode 4 with Storyboard
- Meaning of Warning “while a presentation is in progress!”
- iPhone: Setting Navigation Bar Title
- JSON and Core Data on the iPhone
- UIWebView to view self signed websites (No private api, not NSURLConnection) – is it possible?
- How do I use CaptiveNetwork to get the current WiFi Hotspot Name
- iOS: Change Device Volume
- iOS: Device orientation on load
- Disable orientation change rotation animation
- how to do true deep copy for NSArray and NSDictionary with have nested arrays/dictionary?
- Is there a good tutorial for implementing an augmented reality iPhone application? [closed]
- Offset on UIWindow addSubview
- UIWebView – Enabling Action Sheets on tags
- Test app on iPhone without paying $99 to Apple [closed]