I am new to swift code. I got a question but can't find out the solution for few days and also didn't got the answer from web, too.
I have an app and the root view controller is a UITabBarController. I have two UINavigationControllers controlled by this UITabBarViewController. Each UINavigationController with some UITableViewController and ViewController inside.
My question is that if I press a UIButton in anywhere, I want all UINavigationController go back to root view (the default state when I startup the app). Is it possible to done this by swift code?
Anyone's help would be greatly appreciated. Thank you very much!
I think you can reach your rootViewController from anywhere like this