         
         let previousPage = currentPage
         let previousViewController = currentViewController
+        currentViewController = pagingViewControllers[page]
+        delegate?.willMoveToPageMenuController?(currentViewController, previousMenuController: previousViewController)
+        
         currentPage = page
-        currentViewController = pagingViewControllers[page]
         menuView.moveToMenu(page: currentPage, animated: animated)
-        
-        if currentPage != previousPage {
-            delegate?.willMoveToPageMenuController?(currentViewController, previousMenuController: previousViewController)
-        }
         
         // hide paging views if it's moving to far away
         hidePagingViewsIfNeeded(previousPage)

        view.layoutIfNeeded()

        currentPosition = currentPagingViewPosition()
        if currentPage != previousPage {
            delegate?.didMoveToPageMenuController?(currentViewController, previousMenuController: previousViewController)
        }
    }
    
    // MARK: - UIGestureRecognizer

                self!.view.layoutIfNeeded()
                
                self!.currentPosition = self!.currentPagingViewPosition()
                self!.delegate?.didMoveToPageMenuController?(self!.currentViewController, previousMenuController: previousViewController)
        }
    }
    
