     }
     
     func menuButtonTapped(sender: UIButton) {
-        self.isShown = !self.isShown
         if self.isShown == true {
+            self.hideMenu()
+        } else {
             self.showMenu()
-        } else {
-            self.hideMenu()
         }
     }
 }

            self.didSelectItemAtIndexHandler!(indexPath: indexPath)
            self.setMenuTitle("\(items[indexPath])")
            self.hideMenu()
            self.isShown = false
            self.layoutSubviews()
        }
        

        // Rotate arrow
        self.rotateArrow()
        
        self.isShown = false
        
        // Change background alpha
        self.backgroundView.alpha = self.configuration.maskBackgroundOpacity
        
