简体   繁体   中英

ios UITabBarController change to another UITabBarController

Is it possible to redesign a UITabBarController when clicking on a UITabBarItem?

When starting the app I want to have 5 UITabBarItems:

self.myTabBarController = [CustomTabbarControllerViewController alloc] init];
self.myTabBarController.viewControllers = @[controller1, controller2, controller3, controller4, controller5];
..

When I ll click on controller2 I would like myTabBarController.viewController to contain controllerA, controllerB, controllerC . controllerA will bring the previous tabBarController.

I tried to find some examples on the internet, but i couldn t find any.

You can make 2 tabBarController and make then hidden and show. If you do this thing in single TabBarController then it will remove and add your viewController all time.

So best way to do is use 2 tabBarController in appDelegate.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM