0

I have a navigation item, and when you click a button on that navigation item the navigation controller will pop. This is good but i want to send a message to the navigation item that is above this one in the hierachy before it pops.

Is there anyway to do that?

Thanks

stephen
  • 1,617
  • 3
  • 20
  • 27
  • Can you be more specific? What message do you want to send? Do you want a variable in the above navigation item set from the navigation item that pops? – tarheel Dec 14 '11 at 03:40

1 Answers1

1

You can't trivially find out what view controller is about to be displayed, and send a message to it.

However the system already sends a message to a view controller just before it gets displayed. The - (void)viewWillAppear:(BOOL)animated message will be sent just before the view appears, this includes after the navigation back button is clicked, just before the view is displayed.

That should normally be what you want. Do you have some other requirement here?

Stripes
  • 4,161
  • 2
  • 25
  • 29