         
         self.view.backgroundColor = (distance == 0) ? UIColor.blackColor() : UIColor.clearColor()
         
-        let alpha = 1 - distance * swipeToDissmissFadeOutAccelerationFactor
-        
-        closeButton.alpha = alpha
-        headerView?.alpha = alpha
-        footerView?.alpha = alpha
+        if isHeaderFooterHidden == false {
+            
+            let alpha = 1 - distance * swipeToDissmissFadeOutAccelerationFactor
+            
+            closeButton.alpha = alpha
+            headerView?.alpha = alpha
+            footerView?.alpha = alpha
+        }
     }
     
     func imageViewControllerDidSingleTap(controller: ImageViewController) {
         
-        UIView.animateWithDuration(toggleHeaderFooterAnimationDuration) { [weak self] in
-            
-            if let header = self?.headerView {
-                header.alpha = (header.alpha == 0) ? 1 : 0
-            }
-            
-            if let footer = self?.footerView {
-                footer.alpha = (footer.alpha == 0) ? 1 : 0
-            }
-            
-            if let close = self?.closeButton {
-                close.alpha = (close.alpha == 0) ? 1 : 0
-            }
-        }
+        let alpha: CGFloat = (isHeaderFooterHidden) ? 1 : 0
+        
+        isHeaderFooterHidden = !isHeaderFooterHidden
+        
+        UIView.animateWithDuration(toggleHeaderFooterAnimationDuration, animations: { [weak self] in
+            
+            self?.headerView?.alpha = alpha
+            self?.footerView?.alpha = alpha
+            self?.closeButton?.alpha = alpha
+            
+            })
     }
 }
 

                imageController.closeAnimation(closeAnimationDuration, completion: { [weak self] finished in
                    
                    self?.innerClose()
                })
            }
        }
        else {

    private var galleryPagingMode = GalleryPagingMode.Standard
    var currentIndex: Int
    var previousIndex: Int
    private var isHeaderFooterHidden = false
    
    //LOCAL CONFIG
    private let configuration: GalleryConfiguration
