         }
     }
     
-    // MARK: public methods
+    // MARK: Public Methods
 //    func scroll(offsetX: CGFloat) {
 //    }
     

        moveToIndex(index, animated: animated)
    }
    
    public func changePageToIndex(index: Int, animated: Bool, withCallback callback: (Void) -> Void) {
        changePageWaitForCallback = true
        changePageCallback = callback
        changePageToIndex(index, animated: animated)
    }
    
    // MARK: private methods
    private func stopScrolling() {
        tabSectionScrollView.setContentOffset(tabSectionScrollView.contentOffset, animated: false)
        contentSectionScrollView.setContentOffset(contentSectionScrollView.contentOffset, animated: false)

    private var prevScrollingIndex = -1
    private var prevPageIndex = -1
    
    private var isWaitingForPageChangedCallback = false
    private var pageChangedCallback: (Void -> Void)?
    
    private var tabSectionHeight: CGFloat = 0
    private var contentSectionHeight: CGFloat = 0
