         guard index >= _rootViewControllersInfo.viewControllers.startIndex && index < _rootViewControllersInfo.viewControllers.endIndex else {
             return
         }
-        
+        _rootViewControllersInfo.selectedIndex = index
         let _selectedViewController = _rootViewControllersInfo.viewControllers[index]
         
         _contentScrollView.scrollRectToVisible(_selectedViewController.view.frame, animated: true)

class TabNavigationController: ViewController {
    /// Tab navigation bar of the tab-navigation controller.
    public var tabNavigationBar: TabNavigationBar { return _tabNavigationBar }
    lazy
    private var _tabNavigationBar: TabNavigationBar = _createGeneralTabNavigationBar()
    
    private weak var _trailingConstraintOflastViewController: NSLayoutConstraint?
    
    fileprivate var _transitionNavigationItemViewsInfo: TabNavigationItemViewsInfo?
    lazy

        }
        
        if animated {
            let formerViewController = _formerViewControllerForPop()!
            let formerTransform = formerViewController.view.transform
            
            let transform = viewController.view.transform
            viewController.view.transform = CGAffineTransform(translationX: view.bounds.width, y: 0.0)
            for _viewController in _rootViewControllersInfo.viewControllers {
