UINavigationController and back button action

后端 未结 7 2098
-上瘾入骨i
-上瘾入骨i 2021-01-04 09:09

I have an two controllers 1st is self and 2nd is maincontroller, where I\'m pushing maincontroller in stack

7条回答
  •  忘掉有多难
    2021-01-04 09:34

    Or you can use the UINavigationController's delegate methods. The method willShowViewController is called when the back button of your VC is pressed.

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

提交回复
热议问题