1

i am using navigation based application but i want to pop my view from any of the view i want but it always work like LIFO, what i can do? Is it possible in iPhone ,If it is possible then help me.. I am using this code for pop my view

[self.navigationController popViewControllerAnimated:YES];

Umair_uas
  • 673
  • 1
  • 9
  • 27

1 Answers1

2

I'd recommend taking a look at the class documentation for UINavigationController. Instead of just popping a single view controller, you can:

  • Pop to a specific view controller with popToViewController:animated:
  • Pop all the way to the root with popToRootViewControllerAnimated:
  • Set a brand new stack of view controllers with setViewControllers:animated:

All of these will be automatically animated (if specified) and avoid the "LIFO" method of operation you describe.

Tim
  • 59,527
  • 19
  • 156
  • 165