UINavigationBar delegate problem
UINavigationBar delegate problem
- Subject: UINavigationBar delegate problem
- From: DKJ <email@hidden>
- Date: Tue, 4 Aug 2009 16:53:22 -0700
I've got a "drill down" app where table views are displayed with a
navigation controller. I want my data object to do some things when
the user presses the Back button. So I made the data object the
delegate of the navigation bar, and added this method to it:
- (void)navigationBar:(UINavigationBar *)navigationBar
didPopItem:(UINavigationItem *)item
{
[self restorePreviousArray];
}
As the docs indicate, once I set a delegate for the navigation bar,
the previous view is no longer restored when the Back button is
pressed. But I can't see how to restore this view in the delegate
method. I'm reading the View Controller Programming Guide section on
navigation controllers, but the answer hasn't leapt at me yet.
Is this the best way to react to the Back button being pressed? If so,
how do I restore the previous view? If not, how should I do it?
dkj
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden