Iphone ios 7从navigationViewController中删除viewController

Iphone ios 7从navigationViewController中删除viewController,iphone,objective-c,uinavigationcontroller,ios7,navigationbar,Iphone,Objective C,Uinavigationcontroller,Ios7,Navigationbar,当我这样做的时候: NSMutableArray *viewControllers = [NSMutableArray arrayWithCapacity:1]; [viewControllers addObject:self]; [self.navigationController setViewControllers:viewControllers]; 还是像这样 UINavigationController *nav = self.navigationViewController; NS

当我这样做的时候:

NSMutableArray *viewControllers = [NSMutableArray arrayWithCapacity:1];
[viewControllers addObject:self];
[self.navigationController setViewControllers:viewControllers];
还是像这样

UINavigationController *nav = self.navigationViewController;
NSMutableArray *arrViewControllers = [NSMutableArray arrayWithArray:nav.viewControllers];
[arrViewControllers removeObjectAtIndex:1];
nav.viewControllers = arrViewControllers;
IOS 7上未更新导航栏按钮和标题。因此,当用户触摸一个时,它会崩溃。 有办法解决这个问题吗


它在IOS 6中运行良好。

您应该使用
[nav pushViewController:自动设置动画:是]
[nav POPWVIEWCONTROLLERANIMATED:是]

但问题是我需要将uiviewcontroller设置为根用户。我正在使用。此代码可以解决以下问题:self.sidePanelController.centerPanel=[[UINavigationController alloc]initWithRootViewController:[[jacentereviewcontroller alloc]init]];但我不能给它一个动画。有什么解决办法吗?