0

I've got a "settings" type view that I want to be reachable by every view within my tab navigation. I am able to get to the settings view, but how do I program a button that brings you back to the view that brought you there? For example, if I access the settings view from view 1 I want the back button to bring you back to view 1. Then if I access it from view 2, I want the same back button to bring you back to view 2.

Thanks!

1 Answer 1

6

Is your view in a navigation controller? If so, use:

[self.navigationController popViewControllerAnimated:YES];

If it's a modal view controller, use:

[self dismissModalViewControllerAnimated:YES];
1
  • Awesome! the ModalView worked since I was using a modal transition i guess. Still learning, but thanks a ton!
    – sbjluke
    Aug 3, 2012 at 2:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.