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

    var scrollPositionSwitch: Bool = false //switch position scroll when revealViewController is close
    
    //actionsheet
    /*var longPressRecognizer = UILongPressGestureRecognizer()
    var longPressSwitch: Bool = false
    var longPressAcUrl: String = ""*/
    
    //Search Engines
    //0: Google, 1: Baidu

            //initial y point
            slideViewValue.scrollPosition.append(CGFloat(0.0))
            
            self.loadRequest(urlStr)
        }
        alertController.addAction(opentabAction)
        let copyurlAction = UIAlertAction(title: "Copy Link", style: .Default) { (action) in
            let pb: UIPasteboard = UIPasteboard.generalPasteboard();
            pb.string = urlStr
        }
        alertController.addAction(copyurlAction)
        let shareAction = UIAlertAction(title: "Share Link", style: .Default) { (action) in
            let activityViewController = UIActivityViewController(activityItems: [urlStr as NSString], applicationActivities: nil)
            self.presentViewController(activityViewController, animated: true, completion: {})
        }
        alertController.addAction(shareAction)
        
        return alertController
    }
    
    //function to refresh
    func refreshPressed() {
