Hi,
does anyone knows how can i can call a notification similar to
- (void)applicationWillTerminate:(NSNotification *)notification
which is when app terminate, but what i want is when i drill up a navigation view.
thks in advance.
Hi,
does anyone knows how can i can call a notification similar to
- (void)applicationWillTerminate:(NSNotification *)notification
which is when app terminate, but what i want is when i drill up a navigation view.
thks in advance.
I believe the simplest approach here is to implement UINavigationControllerDelegate, set your class as the delegate for your UINavigationController, and use
-(void)navigationController:willShowViewController:animated:
to track changes. You'll have to write some logic to figure out if you've just navigated up or down.
For example, in your delegate...
-(void)navigationController:(UINavigationController *)aController
willShowViewController:(UIViewController *)aViewController
animated:(BOOL)animated
{if( [aViewController isKindOfClass:[MyCustomViewController class]])
{
//ive just popped or pushed the MyCustomViewController instance
//do something.
}
}