Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LeftSideMenu is not responding #224

Open
oxxy opened this issue Mar 6, 2017 · 1 comment
Open

LeftSideMenu is not responding #224

oxxy opened this issue Mar 6, 2017 · 1 comment

Comments

@oxxy
Copy link

oxxy commented Mar 6, 2017

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

    MFSideMenuContainerViewController *container = [MFSideMenuContainerViewController
                                                    containerWithCenterViewController:[[UINavigationController alloc]
                                                                                       initWithRootViewController:[[MainViewController alloc] initWithNibName:@"MainViewController" bundle:nil]]
                                                    leftMenuViewController:[[SideViewController alloc] initWithNibName:@"SideViewController" bundle:nil]
                                                    rightMenuViewController:nil];
    self.window.rootViewController = container;
    [self.window makeKeyAndVisible];
    return YES;
}

The menu appear correctly and all of it's contents but the components inside it (button, tableview, etc...) not responding to any interaction . I've created a new clean project and add the menu only on it but with no hope.

@alejandroivan
Copy link

alejandroivan commented May 8, 2017

Be careful when replacing the current UIWindow by a new one. This is working for me, without re-alloc.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    UIViewController *leftMenuViewController     = [self.window.rootViewController.storyboard instantiateViewControllerWithIdentifier:@"LeftSideMenuViewController"];
    UIViewController *rightMenuViewController    = nil;
    MFSideMenuContainerViewController *container = [MFSideMenuContainerViewController containerWithCenterViewController:self.window.rootViewController leftMenuViewController:leftMenuViewController rightMenuViewController:rightMenuViewController];


    container.menuSlideAnimationEnabled = YES;
    container.menuSlideAnimationFactor  = 3.0f;
    container.shadow.enabled            = YES;
    container.shadow.radius             = 1.0f;
    container.shadow.color              = [UIColor blackColor];
    container.shadow.opacity            = 0.75f;
    
    // The width of the menu will be the screen width minus 62 dots.
    // That basically means it will adapt to the screen size.
    container.menuWidth                 = [[UIScreen mainScreen] bounds].size.width - 62.0f;
    
    self.sideMenuContainer              = container;
    self.window.rootViewController      = container;


    return YES;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants