0

How can I imitate back button (navigation bar) using code?

I want return from detail view to master view with code.

Thanks

Max MacLeod
  • 26,115
  • 13
  • 104
  • 132
juan
  • 179
  • 2
  • 6
  • 12

1 Answers1

2
[self.navigationController popViewControllerAnimated:YES];

That will "pop" (opposite of push) the current view controller off the navigation stack. Exactly what the back button does.

Thomas Clayson
  • 29,657
  • 26
  • 147
  • 224
  • No worries. If I helped you feel free to press the up button on the left next to my answer and click the tick to set as the answer to your question. – Thomas Clayson Feb 16 '12 at 10:47