Blocking gestures in minimized topViewController

This commit is contained in:
nullproduction 2014-01-31 15:34:15 +04:00
parent af6e1c33d5
commit e04b5f806a
1 changed files with 4 additions and 2 deletions

View File

@ -308,7 +308,8 @@ static SlideNavigationController *singletonInstance;
- (void)openMenu:(Menu)menu withDuration:(float)duration andCompletion:(void (^)())completion
{
[self.topViewController.view addGestureRecognizer:self.tapRecognizer];
self.topViewController.view.userInteractionEnabled = NO;
[self.topViewController.navigationController.view addGestureRecognizer:self.tapRecognizer];
[self prepareMenuForReveal:menu forcePrepare:NO];
@ -329,7 +330,8 @@ static SlideNavigationController *singletonInstance;
- (void)closeMenuWithDuration:(float)duration andCompletion:(void (^)())completion
{
[self.topViewController.view removeGestureRecognizer:self.tapRecognizer];
self.topViewController.view.userInteractionEnabled = YES;
[self.topViewController.navigationController.view removeGestureRecognizer:self.tapRecognizer];
[UIView animateWithDuration:duration
delay:0