aryaxt / iOS-Slide-Menu

iOS Slide Menu with ability to add both left and right menu, and built in gesture recognizer. Similar to Path and Facebook
Other
1.52k stars 359 forks source link

Block tap recognizing on root Controller? #238

Open NikKovIos opened 7 years ago

NikKovIos commented 7 years ago

Hello, could you please tell if there is such an attribute to block any touches on main screen, when menu is opened, until it would be closed? Or when menu is opened and there is a touch on second Controller, the menu would close.

NikKovIos commented 7 years ago

I found out, that when i change top controller by [self performSegueWithIdentifier:segueIdentifier sender:self]; the gesture recognizing is working (that i don't want to) when menu is opened.

[[SlideNavigationController sharedInstance] performSegueWithIdentifier:segueIdentifier sender:self]; crashed with -'Receiver (<SlideNavigationController: 0x15b69e00>) has no segue with identifier 'EventStorySegue''

NikKovIos commented 7 years ago

The problem was at [self enableTapGestureToCloseMenu:NO]; at 143 line. Maybe you should bring it to if (self.menuNeedsLayout) { here } ?

paradojaaa commented 7 years ago

Thanks for the tip, I changed that line to: if ( [self isMenuOpen]) { [self enableTapGestureToCloseMenu:YES]; } else{ [self enableTapGestureToCloseMenu:NO]; } and now it's working.