How to add BackButton Facility MFSlidemenu?

2019-03-05 02:00发布

问题:

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];

回答1:

  • Here is the Solution

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