import UIKit
class RootviewTabViewController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {
let rootView = self.viewControllers![self.selectedIndex] as! UINavigationController
rootView.popToRootViewController(animated: false)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
No comments:
Post a Comment