Initially my app starts with a view controller(TabBarView) which I have set in AppDelegate file.
window = UIWindow(frame: UIScreen.main.bounds)
window?.makeKeyAndVisible()
let tabBarView = TabBarView()
navigationController = UINavigationController(rootViewController: tabBarView)
window?.rootViewController = navigationController
Later in an app, when few criteria are met, I want to change my rootController to a new one(MusicPage).
At the moment I've create a new NavigationController object to display my (MusicPage)viewController however I think that my (TabBarView)viewController might be running in background and consuming memory.
I would really appreciate if someone tells me how to change my initial rootViewController.
Thanks. :)