This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
In my application I am using UINavigationController to nav around to different views. I turned on the Shows Toolbar option in the interface builder for my UINavigationController. I understand how to add items to this toolbar. However, I have a couple of items that will be the same throughout the entire application, they show up on every view; Logout & Menu.
I'm looking for a way to attach events to these buttons on each controller so that the same method is called. What I mean is, I don't want to have to write the IBAction methods in every controller. This would duplicate the same logic 10+ times.
Maybe create a base interface/class that all your controller's extend, then they all will have the same IBAction. You can even not implement the action in the controllers, but delegate it even more. Maybe the delegation is overkill.
It is really easy for me to lose all the great OO stuff that I usually do in Java, when I am coding Objective-c. But I think in the long run, all of us would be better to get into the habit of doing good OO in iPhone development.
And Gregg, you can be the Guinea Pig. Let me know how it goes. ;)