             var contentOffset = scrollView.contentOffset
             contentOffset.x = self.scrollPreviewPoint.x
             scrollView.contentOffset = contentOffset
+            
+            let screenHeight = UIScreen.mainScreen().bounds.size.height
+
+            if self.scrollView.contentOffset.y > screenHeight * 1.4 {
+                self.closePhotoSlider(true)
+            } else if self.scrollView.contentOffset.y < screenHeight * 0.6  {
+                self.closePhotoSlider(false)
+            }
+            
         } else if self.scrollMode == .Horizontal {
             var contentOffset = scrollView.contentOffset
             contentOffset.y = self.scrollPreviewPoint.y

    public func scrollViewWillBeginDragging(scrollView: UIScrollView) {
        self.scrollPreviewPoint = scrollView.contentOffset
    }

    public func scrollViewDidScroll(scrollView: UIScrollView) {
        
        if scrollInitalized == false {
            self.generateCurrentPage()
            return

    var closeButton:UIButton!
    var scrollMode:PhotoSliderControllerScrollMode = .None
    var scrollInitalized = false
    var closeAnimating = false

    public var delegate: PhotoSliderDelegate? = nil
    public var visiblePageControl = true
