如果我在[detailNavigationController popToRootViewControllerAnimated:NO]
viewControllers之前没有添加[detailNavigationController setViewControllers:...]
,那么在setViewControllers
没有收到viewWillDisappear并且没有取消分配之前会推送这些viewWillAppear
。我检查了,我正在转发viewDidAppear
,automaticallyForwardAppearanceAndRotationMethodsToChildViewControllers
等等。我还尝试添加shouldAutomaticallyForwardAppearanceMethods
并单独添加{{1}}以返回YES(即使默认值已经是YES )。那些也不行。
我可能做错了什么?
答案 0 :(得分:0)
在viewcotroller上调用autorelease
TestViewController * testView = [[[TestViewController alloc]initWithNibName @"TestViewController" bundle: nil]autorelease];
[self.navigationcontroller setViewControllers: @[testView] animated: YES];