Disable BackButton when navigation controllers pressed through a tab bar controller

I have a navigation controller. I create a tab bar controller and add 3 additional views to it. so that I can return to the root view controller.

The problem is that since I have navigation controllers in the format of the tab bar, I cannot turn off the back button.

If only one view controller is added to the navigation controller, I can turn off the back button, but when I click the tab bar controller on the navigation control, the back button does not turn off. I want to disable it and add my own button.

+3
source share
1 answer

tabBarController, . , "" tabBarController, , :

self.tabBarController.navigationItem.hidesBackButton = NO;
+7

Source: https://habr.com/ru/post/1794019/


All Articles