I am trying add a custom back button so that I can perform some tasks before popping the controller. But no matter how hard I tried this function bind with back button doesn't work. I am adding some code to understand
-(void)customizeNavigationBar
{
self.navigationController.navigationBarHidden = NO;
self.navigationItem.title = @"Video Call";
UIBarButtonItem *backButton = [[UIBarButtonItem alloc]
initWithTitle:@" " style:UIBarButtonItemStylePlain
target:self action:@selector(didBackBtnTap)];
[self.navigationItem setBackBarButtonItem:backButton];
}
and this is the function, which is not calling at all,
-(void)didBackBtnTap
{
[self popToProfileScreen];
}
Please suggest any solution, Thanks in advance.