         if completed{
             let index = pageViewController.viewControllers?[0].view.tag ;
             if (index! < segmentControl.numberOfSegments) {
-                self.segmentControl.selectSegment(segmentbButton: nil, index:index)
+//                self.segmentControl.selectSegment(segmentbButton: nil, index:index)
 //                _lastSelectedSegmentIndex = index!;
             }
             else{

}


class SDSegmentPageViewController: UIPageViewController, UIGestureRecognizerDelegate{
 
    private   var _panGest : UIPanGestureRecognizer!
//    private   var _swipeGest : UISwipeGestureRecognizer!
    
    
    var scrollDelegate:SDSegmentPageViewControllerDelegate?


        
        let scrollVu = self.getScrollView(mainView: self.view)
       
//        _panGest = scrollVu?.panGestureRecognizer
//        _panGest.addTarget(self, action: #selector(handlePan(panGest:)))
        
        scrollVu?.delegate = self
        
    }
    
    override func didReceiveMemoryWarning() {
