可能重复:
Can you swap the NIB file for a UIViewController that's already on-screen?
如何在不使旧对象为零并重新分配的情况下加载新的NIB文件?
为了澄清,我需要做的是更改当前加载的nib文件。
早些时候:
viewController1 = [[UIViewController alloc] initWithNibName:@"Nib" bundel:nil];
通缉:
[viewController1 someMethodToChangeLoadedNib:@"NewNib"];
或某种方式绕过键入[viewController1.view removeFromSuperview]
然后viewController1 = nil
并重新分配。