我已在我的项目中实现了MFSideMenu。它运行良好,但现在我想为每个视图实现后退按钮功能。
我试试这个但不行:
NSArray *array = [self.navigationController viewControllers];
[self.navigationController popToViewController:[array objectAtIndex:1] animated:YES];
答案 0 :(得分:0)
以下是解决方案
HomeView *Home = [[HomeView alloc]initWithNibName:@"HomeView" bundle:nil];
NSArray *controllers = [NSArray arrayWithObject:Home];
self.navigationController.viewControllers = controllers;