             }
         )
     }
-
+    
     public func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
         self.scrollMode = .None
     }
-
+    
     // MARK: - Button Actions
-
+    
     func closeButtonDidTap(sender:UIButton) {
+
         if self.delegate!.respondsToSelector("photoSliderControllerWillDismiss:") {
             self.delegate!.photoSliderControllerWillDismiss!(self)
         }
         self.dissmissViewControllerAnimated(true)
+
     }
     
     // MARK: - Private Methods

            return
        }
        
        let offsetX = fabs(scrollView.contentOffset.x - self.scrollPreviewPoint.x)
        let offsetY = fabs(scrollView.contentOffset.y - self.scrollPreviewPoint.y)

        if self.scrollMode == .None {
            if (offsetY > offsetX) {
                self.scrollMode = .Vertical;

        self.view.addConstraints(constraintVertical)
        self.view.addConstraints(constraintCenterX)
    }
    
    // MARK: - UIScrollViewDelegate

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

    public func scrollViewDidScroll(scrollView: UIScrollView) {

        if scrollInitalized == false {
