I'm trying to make a simple one level in navigation bar. I'm just simply listing some buttons and I want to be able to click them go to a new view and have the user click the back button on the navigation bar to return to the main list.
I have the navigation bar set up and the list of buttons etc. and when the user clicks on a view I push the new navigation item onto the bar and the back button appears.
My only problem is handling the pressing of the back button. I am trying to use the function:
-(void) navigationBar: (UINavigationBar *)bar buttonClicked: (int) button
but I can't get this function to be hit. Is this the wrong function for the job? Is there a function to override which is specific to the back button?
Please let me know if you need any more clarification.
Thank you in advance for any help you can provide.
Thanks for the reply. I'm currently doing this:
[navBar setDelegate: self]; in the same file that has the buttonClicked function.
I also tried adding to the .h of that file <UINavigationBarDelegate>.
Is there anything else I need to do to make the delegate set correctly? I'm pretty bad at this stuff.