问题
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;
来源:https://stackoverflow.com/questions/39265673/how-to-add-backbutton-facility-mfslidemenu