             toControllerInteractive?.view.layer.position.x = animationDirectionInteractive == .left ? containerView.bounds.width * 2.0 : -containerView.bounds.width / 2.0
         }
         
-        timerForInteractiveTransition = Timer.scheduledTimer(timeInterval: timeInterval, target: self, selector: #selector(finishAnimationTransition), userInfo: nil, repeats: true)
-    }
-    
-    var willFinishAnimationTransition = true
+        timerForInteractiveTransition = Timer.scheduledTimer(timeInterval: timeInterval / timerVelocity, target: self, selector: #selector(finishAnimationTransition), userInfo: nil, repeats: true)
+    }
     
     func finishAnimationTransition() {
         if let fromController = fromControllerInteractive, let toController = toControllerInteractive {

            toControllerInteractive?.view.layer.timeOffset = CFTimeInterval(timeOffset)
            fromControllerInteractive?.view.layer.timeOffset = CFTimeInterval(timeOffset)
        case .cancelled, .ended:
            interactiveTransitionInProgress = false
            if fromControllerInteractive != nil, toControllerInteractive != nil {
                startTimerForInteractiveTransition()

            break
        }
    }
    
    func swipeAction(direction: AnimationDirection) {
        if direction == .right {
            let index = selectedIndex! - 1
            if index >= 0 {
                selectController(atIndex: index, animated: isEnabledAnimation)
            }
        } else {
            let index = selectedIndex! + 1
            if index <= viewControllers.count - 1 {
                selectController(atIndex: index, animated: isEnabledAnimation)
            }
        }
    }


}
