MFSideMenu
MFSideMenu copied to clipboard
LeftSideMenu is not responding
- (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.
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;
}