• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UINavigationBar delegate problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: UINavigationBar delegate problem
      • From: Luke the Hiesterman <email@hidden>
  • Prev by Date: Main Event queue
  • Next by Date: Delayed perform crash on save
  • Previous by thread: Re: Main Event queue
  • Next by thread: Re: UINavigationBar delegate problem
  • Index(es):
    • Date
    • Thread