HomeiosiPhone Development:Pop to particular viewController
iPhone Development:Pop to particular viewController
October 16, 2012
In this post i am going to tell you use of how one can pop back to previous view-controller in iPhone SDK. Objective C provides us two ways to pop back to a previous view-controller placed in a navigation stack.They are two ways to do it
Now, if you want to pop back to Screen 2 and currently you are on Screen 5. To achieve this first you have to iterate all viewController placed in navigationController Stack and then you can use first method given above.
Below is the piece of code that explains you , how you can achieve this scenario
for (UIViewController *vC in [self.navigationControllerviewControllers])