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

        self.backgroundView.backgroundColor = self.configuration.maskBackgroundColor
        self.backgroundView.autoresizingMask = UIViewAutoresizing.FlexibleWidth.union(UIViewAutoresizing.FlexibleHeight)
        
        // Init table view
        self.tableView = BTTableView(frame: CGRectMake(menuWrapperBounds.origin.x, menuWrapperBounds.origin.y + 0.5, menuWrapperBounds.width, menuWrapperBounds.height + 300), items: items, configuration: self.configuration)
        

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