If you are trying to move to 2nd view controller from 5th view controller (skipping 3rd and 4th), you would like to use [self.navigationController popToviewController:secondViewController]
.
You can obtain the secondViewController
from the navigation controller stack.
secondViewController = [self.navigationController.viewControllers objectAtIndex:yourViewControllerIndex];