I am using SWRevealViewController in order to implement a side nav menu in my app. I would like to make it so that the front view cannot be interacted with when
Put below code on menu view controller its works for me
@interface SidebarTableViewController() {
UIView* coverView;
}
- (void)viewWillDisappear:(BOOL)animated {
[coverView removeFromSuperview];
//[self.revealViewController.frontViewController.view setUserInteractionEnabled:YES];
// get your window screen size
}
- (void)viewWillAppear:(BOOL)animated {
// get your window screen size
CGRect screenRect = [[UIScreen mainScreen] bounds];
//create a new view with the same size
coverView = [[UIView alloc] initWithFrame:screenRect];
// change the background color to black and the opacity to 0.6
coverView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.6];
// add this new view to your main view
[self.revealViewController.frontViewController.view addSubview:coverView];
// [self.revealViewController.frontViewController.view setUserInteractionEnabled:NO];
}