     
     //MARK: UIScrollViewDelegate's method
     open func scrollViewDidScroll(_ scrollView: UIScrollView) {
-        //Update bar position
+        // Delegate
+        delegate?.pagerController?(self, scrollViewdidScroll: scrollView)
+        
+        // Update bar position
         scrollIndicator.frame.origin.x = scrollView.contentOffset.x/scrollView.contentSize.width * scrollView.frame.size.width
-        //When content offset changes, check if it is closer to the next page
+        // When content offset changes, check if it is closer to the next page
         var index: Int = 0
         if scrollView.contentOffset.x == 0 && scrollView.frame.size.width == 0 {
             index = 0

    
    /// Normal text color in segmented control bar
    /// Default value is UIColor.lightGray
    public var segmentedFont: UIFont = UIFont.systemFont(ofSize: UIFont.systemFontSize) {
        didSet {
            if viewIfLoaded != nil {
                updateSegmentedNormalTitleTextAttributes()

    //MARK: Segmented control action
    func pageSegmentedControlValueChanged() {
        //Call delegate method before changing value
        delegate?.pagerController?(self, willChangeSelectedPageIndex: selectedPageIndex, fromPageIndex: previousPageIndex)
        
        let oldViewController = viewControllers[previousPageIndex]
        let newViewController = viewControllers[selectedPageIndex]
