Side Out Menu didn't clickable in Ipad pro IOS 11-inch obj c

50 Views Asked by At

I faced a problem in my objective c code,

I have a side menu,

the side menu works successfully on all devices except the Ipad pro-11-inch,

but in (Ipad pro-11-inch) all table view methods work successfully except "didSelectRowAtIndexPath"

I didn't know the is the problem,

This is some of my code:

in appdelegate.m:

  [[ApplicationDelegate window] setRootViewController: [storyboard instantiateInitialViewController]];
    [[SlideNavigationController sharedInstance] initWithRootViewController:destinationViewController];
    // SlideNavigation Width
    int num = isTargetedSize ? 3 : 2;
    CGFloat portraitSlideOffset = [UIScreen mainScreen].bounds.size.width / num;
    // SlideNavigation
    UIViewController *viewController = (SlideOutMenuViewController *)[storyboard instantiateViewControllerWithIdentifier: @"SlideOutMenuViewController"];
    [[SlideNavigationController sharedInstance] setLeftMenu: viewController];
    [[SlideNavigationController sharedInstance] setMenuRevealAnimationDuration: 0.25f];
    [[SlideNavigationController sharedInstance] setEnableSwipeGesture:YES];
    [[SlideNavigationController sharedInstance] setPortraitSlideOffset:portraitSlideOffset];

in SlideOutMenuViewController.h

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    modulesArray = [defaults objectForKey:@"modulesArray"];
    NSLog(@"viewDidLoad_Slide");
    
    //
    [self mapAuthModules];
    
    // Auto resize table view cell
        self.tableView.rowHeight = UITableViewAutomaticDimension;
//        self.tableView.rowHeight = 44;

//    self.tableView.cancelsTouchesInView = false
    //
    serviceGroup = dispatch_group_create();
} 

how can i solve this problem?

1

There are 1 best solutions below

0
prathamesh On

in SlideNavigationController you have to add this line

[self.view.superview insertSubview:menuViewController.view atIndex:0];