I am using swreveal view controller I want after click on menu then we should unable to interact with front view if we tap on front view then rear should close. I am using the below code for disable the interaction but if we disable the interaction then tap guesture also will not work.
- (void)revealController:(SWRevealViewController *)revealController willMoveToPosition: (FrontViewPosition)position {
if(position == FrontViewPositionLeft) {
self.view.userInteractionEnabled = YES;
} else {
self.view.userInteractionEnabled = NO;
}
}
- (void)revealController:(SWRevealViewController *)revealController didMoveToPosition: (FrontViewPosition)position {
if(position == FrontViewPositionLeft) {
self.view.userInteractionEnabled = YES;
} else {
self.view.userInteractionEnabled = YES;
hideFilter=[[UIView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
hideFilter.backgroundColor=[UIColor blueColor];
[self.view addSubview:hideFilter];
SWRevealViewController *reveal = self.revealViewController;
reveal.delegate = self;
if ( reveal )
{
[hideFilter addGestureRecognizer:self.revealViewController.tapGestureRecognizer];
[hideFilter addGestureRecognizer:self.revealViewController.panGestureRecognizer];
}
}
}
I used the hidefilter to hide the interaction from self.view and add a gusture on it but after click on it this view should remove and interact main view. then how can I do this. if there is another way to do this please tell Thank