         }
     }
     
-    /*func onLongPress(gestureRecognizer:UIGestureRecognizer){
-        if gestureRecognizer.state == UIGestureRecognizerState.Began {
-            longPressSwitch = true
-        }
-    }*/
+    func onLongPress(gestureRecognizer:UIGestureRecognizer){
+        longPressSwitch = true
+    }
 
     //function to hide the statusbar
     func hideStatusbar() {

        UIView.animateWithDuration(0.3, delay: 0, options: UIViewAnimationOptions.CurveEaseIn, animations: {
            self.navBar.frame = CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, 0)
            }, completion: { finished in
                self.navBar.frame = CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, 0)
        })
    }
    
    //function to show the statusbar

        forwardButton.enabled = false
    }
    
    func gestureRecognizerShouldBegin(gestureRecognizer: UIGestureRecognizer) -> Bool {
        return true
    }
    
    func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWithGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool {
        return true
    }
