UINavigationController: navigationController:willShowViewController:animated: never called

I am using a UINavigationController in my storyBoard which is set to be my initialViewController. I set in Xcode Navigator as my class and created a class named Navigator.

There I implement UINavigationControllerDelegate but the method navigationController:willShowViewController:animated: is never called.

Do I need to do something else? Do I need to call setDelegate? because this didn't work for me.

Any advice?

1 answer

  • answered 2018-11-07 22:33 Sh_Khan

    You can try

    -(void)awakeFromNib {
      [super awakeFromNib];
      self.delegate = self;
    }
    

    @interface Navigatior:UINavigationcontroller<UINavigationControllerDelegate>