     
     fileprivate var _rootViewControllersInfo: (selectedIndex: Array<UIViewController>.Index, viewControllers: [UIViewController]) = (0, [])
     fileprivate var _viewControllersStack: [UIViewController] = []
-    fileprivate var _headOfViewControllersStack: Array<UIViewController>.Index = 0
     
     // MARK: - Overrides.
     override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {

        let duration: TimeInterval = 0.5
        let titleItems = [TabNavigationTitleItem(title: viewController.title ?? "")]
        tabNavigationBar.setNavigationTitleItems(titleItems, animated: animated, actionsConfig: { () -> (ignore: Bool, actions: [TabNavigationTitleActionItem]?) in
            return (true, nil)
        }) { animationParameters in
            if animated {
                let toTransform = animationParameters.toItemViews.itemsView.transform
                let fromTransform = animationParameters.fromItemViews.itemsView.transform
                
                let translation = min(animationParameters.fromItemViews.itemsView.bounds.width - animationParameters.fromItemViews.alignmentContentView.bounds.width, animationParameters.containerView.bounds.width) - animationParameters.fromItemViews.itemsScrollView.contentOffset.x
                
                animationParameters.toItemViews.itemsView.transform = CGAffineTransform(translationX: translation, y: 0.0)
                animationParameters.toItemViews.itemsView.alpha = 0.0
                
                UIView.animate(withDuration: duration, delay: 0.0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0.8, options: [], animations: {
                    animationParameters.toItemViews.itemsView.transform = toTransform
                    animationParameters.toItemViews.itemsView.alpha = 1.0
                    animationParameters.fromItemViews.itemsView.alpha = 0.0
                    animationParameters.fromItemViews.itemsView.transform = CGAffineTransform(translationX: -translation, y: 0.0)
                }, completion: { [unowned self] finished in
                    if finished {
                        animationParameters.fromItemViews.itemsView.transform = fromTransform
                        animationParameters.fromItemViews.itemsView.alpha = 1.0
                        self.tabNavigationBar.commitTransitionTitleItemViews(animationParameters.toItemViews, items: titleItems)
                    }
                })
            }
        }
        tabNavigationBar.setNavigationItems(viewController.tabNavigationItems, animated: animated)

protocol TabNavigationReadable: class {
    var tabNavigationController: TabNavigationController? { get }
    var tabNavigationItems: [TabNavigationItem] { get }
    var tabNavigationTitleActionItemsWhenPushed: [TabNavigationTitleActionItem] { get }
}

// MARK: Tab Navigation Controller.
