seggy seggy - 1 month ago 4x
iOS Question

How to add BackButton Facility MFSlidemenu?

I have implemented MFSideMenu in my project .It works great, but now i want to implement back button facility to every view.

I try this but not working:

NSArray *array = [self.navigationController viewControllers];

[self.navigationController popToViewController:[array objectAtIndex:1] animated:YES];

  • Here is the Solution

    HomeView *Home = [[HomeView alloc]initWithNibName:@"HomeView" bundle:nil];
    NSArray *controllers = [NSArray arrayWithObject:Home];
    self.navigationController.viewControllers = controllers;