         
         if targetPage != self.page {
             
+            _page = targetPage
             self.pageChangeHandler?(targetPage)
         }
     }

        }
    }
    
    ///Current page index.
    open var page: Page {
        
        get {
            
            return self.pageFor(size: self.pageableScrollView.bounds.size, contentOffset: self.pageableScrollView.contentOffset)
        }
        
        set {
            
            self.pageableScrollView.contentOffset.x = CGFloat(newValue.horizontal) * self.pageableScrollView.bounds.size.width
            self.pageableScrollView.contentOffset.y = CGFloat(newValue.vertical) * self.pageableScrollView.bounds.size.height
            
            self.scrollView.contentOffset = self.pageableScrollView.contentOffset
        }
    }
    
    /**

    ///The target scroll view, which paging should be adjusted with custom page size
    public let scrollView: UIScrollView
    
    ///A closure, called when the user swipes to a different page. Not called when the page is changed programatically.
    open var pageChangeHandler: ((Page) -> Void)?
    
    ///The pageable scroll view, used to setup the desired paging behaviour. The technique used is swapping of the panGestureRecognizer, as per few WWDC sessions.
