1

我正在用这样的代码更改导航控制器的根视图:

NSMutableArray *viewControllers = [NSMutableArray arrayWithArray:    
[self.navigationController viewControllers]];
NewViewController *nvc = [[NewViewController alloc] init];
[viewControllers replaceObjectAtIndex:0 withObject:nvc];
[self.navigationController setViewControllers:viewControllers];

我需要在用 newviewcontroller 替换当前视图控制器后手动释放它还是自动完成?

4

0 回答 0