Re: UINavigationBar delegate problem
Re: UINavigationBar delegate problem
- Subject: Re: UINavigationBar delegate problem
- From: Luke the Hiesterman <email@hidden>
- Date: Tue, 4 Aug 2009 17:29:48 -0700
Perhaps a better approach would be to act as delegate to the
UINavigationController. You could then respond to
navigationController:willShowViewController:animated:
Luke
On Aug 4, 2009, at 4:53 PM, DKJ wrote:
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
_______________________________________________
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