Search code examples
iosswiftxcode

iOS-Slide-Menu not detecting taps in menu ViewControllers (only iPad)


In a legacy project I'm using the library aryaxt/iOS-Slide-Menu version 1.4.5. (I know is old but migrating would be really expensive so I'd like to postpone it as long as possible).

The problem I'm experiencing is that I can't click in any view inside de left menu viewcontroller when running on iPad but strangely on iPhone devices the menu works fine and clicks are detected correctly...

I think the problem appeared after the error

SDK does not contain 'libarclite' at the path'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a'; 
try increasing the minimum deployment target

Forced me to increase the minimum deployment target from 8.0 to 12.0. So maybe the error is due to SDK changes between these versions.

Almost all the library code is in the class SlideNavigationController.m

Could you help me locate this error even if it means modifying the library code?


Solution

  • You can fix it by changing

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

    to

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

    in the following function of SlideNavigationController.m file

    - (void)prepareMenuForReveal:(Menu)menu
    

    This will modify the library but it is the easiest solution.