views:

31

answers:

1

Hi,

I want to pop more than one controller that means If I have totally 6 screens. Sometimes I have to come to 2nd view controller or 3rd controller from 6 th controll.

I know how to pop the current controller or poping till root view controller. But need to pop till particular controller.

Can any one please guide me. Thanks in advance.

+1  A: 

In UINavigationController you have a method called - (NSArray *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated.

You can look for your UIViewController in the viewControllers property, and then pop to the view controller you want.

pgb