Reputation: 2833
I already have the automatically generated back button in the top left corner, but I'd like to add a UIButton that does the same at the bottom of my view.
Is that possible?
Thanks!
Upvotes: 0
Views: 117
Reputation: 73966
Yes, just hook the button up to a method that calls [self.navigationController popViewControllerAnimated:YES]
(or NO
, depending on your wishes).
Upvotes: 1
Reputation: 353
IF you are using a UINavigation controller, you can register a button handler and add the code
[[self navigationController] popViewControllerAnimated:YES];
This will provide the same functionality as the back button generated when you add a view to the view stack.
Upvotes: 2