I have a problem I want to control the backBarButtonItem when I click on it Action backAction "works my problem is that SetAction does not work, I hope there is a solution for the controller backBarButtonItem
- (void)viewDidLoad {
[self.navigationItem.backBarButtonItem setTarget:self];
[self.navigationItem.backBarButtonItem setAction:@selector(backAction)];
[super viewDidLoad];
}
- (void)backAction {
if ((isSaveCarte==NO)&&(isNewCarte)) {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Alert" message:@"Voulez vous Enregistrer la Carte" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Save",nil];
[alertView show];
[alertView release];
}
}