i have uiviewcontroller with navigation bar and a back button on him,and i try to set a method for this back button with this :
UIBarButtonItem *rButton = [self.navigationItem leftBarButtonItem];
[rButton setAction:@selector(cancelCheck)];
and when I press the back button this method won’t call
Try setting the target to
self(or whatever object that has thecancelCheckselector)