We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I just want to move between my tab, but i dont want to loose my title and nav bar controller. Is it is possible?
The text was updated successfully, but these errors were encountered:
I think so, if you put the UITabBarController inside a UINavigationController you should be able to do that.
UITabBarController
UINavigationController
Sorry, something went wrong.
Definitely possible
Quick code sample in AppDelegate.swift
AppDelegate.swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. window = UIWindow(frame: UIScreen.main.bounds) let tabBarController = TabBarController() let controller1 = UIViewController() controller1.view.backgroundColor = UIColor.blue controller1.title = "VC 1" let controller2 = UIViewController() controller2.view.backgroundColor = UIColor.red controller2.title = "VC 2" tabBarController.setViewControllers([controller1, controller2], animated: false) tabBarController.title = "TabBar Title" let navigation = UINavigationController(rootViewController: tabBarController) if #available(iOS 11.0, *) { navigation.navigationBar.prefersLargeTitles = true } window?.rootViewController = navigation tabBarController.selectedViewController = controller1 window?.makeKeyAndVisible() return true }
No branches or pull requests
I just want to move between my tab, but i dont want to loose my title and nav bar controller. Is it is possible?
The text was updated successfully, but these errors were encountered: