如何添加BackButton Facility MFSlidemenu?

时间:2016-09-01 07:48:34

标签: ios iphone uinavigationbar mfslidemenu

我已在我的项目中实现了MFSideMenu。它运行良好,但现在我想为每个视图实现后退按钮功能。

我试试这个但不行:

NSArray *array = [self.navigationController viewControllers];

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

1 个答案:

答案 0 :(得分:0)

  • 以下是解决方案

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