     
     //メニューボタンを押した時のアニメーション
     func MenuButtontapped(sender: UIButton){
-        let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: "onTap:")
         
-        if(menushow == 0){      //Menuが出ていない時
-            
+        if(menushow == 0){      //Menuが出てくる
+            tap.addTarget(self, action: "onTap:")
             self.AnimationMenuView.addGestureRecognizer(tap)
             UIView.animateWithDuration(1.5, delay: 0.0, options: [UIViewAnimationOptions.Repeat,UIViewAnimationOptions.AllowUserInteraction], animations: { () -> Void in
                 

    
    var screentransitionbuttonarray: [UIButton] = []
    let buttonarrayinfo: [[Int]] = [[225,171,50],[75,260,50],[200,330,50],[145,217,90]] //右上,左下,右下,真ん中
    
    override func viewDidLoad() {
        super.viewDidLoad()
        

        
    }
    
    func onTap(gestureRecognizer: UITapGestureRecognizer){
        print("tap")
    }
    
