views:

18

answers:

0

Hi there ;)

I have an app with tableViews, and on some of them, the cells dislays an accessoryDetailDisclosureButton that pushes a DetailViewController. On this DetailViewController, the user can change some data. I show a "Save" Button to explicitly save the data. BUT (yes, there's always a but), let's say that the user changes some data, and hit the "Back" button on the UINavigationBar. I'd like to freeze the screen with an ActionSheet, telling the user that some datas have changed and he did not saved it. Would you like to save it, etc. etc. etc. I thought that using UINavigationControllerDelegate and/or UINavigationBarDelegate would do th thing, so I done this :

self.navigationController.delegate = self;
self.navigationController.navigationBar.delegate = self;

and I put a NSLog in these 2 methods

- (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item

and

- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewControlleranimated:(BOOL)animated

But I never get in these 2 methods.

Does anyone knows how to do that and/or what's wrong here? Thx.