Using iOS I Have 15 ViewControllers now I want to pop from one ViewController to another View Controller.
I am using this code:
SecondViewController *Sec
You can't pop to a new view controller (like you do with your secondViewController example).
When using a UINavigationController you
Add Controller to the stack with:
[self.navigationController pushViewController: animated:YES];
Pop to the previous one with :
[self.navigationController popViewControllerAnimated:YES];
Pop to a previous controller in the stack (Must have been pushed before) :
[self.navigationController popToViewController: animated:YES];
Go back to the root Controller with
[self.navigationController popToRootViewControllerAnimated:YES];