我正在从initWithNibName的bundle中加载一个UIViewController:bundle:.如果我在viewDidLoad中设置断点,我可以看到它的视图已设置.在Interface Builder中查看About.xib时,我也可以看到这一点.
然而,一旦视图实际上第一次使用(根据我的应用程序的逻辑调用[self.navigationController pushViewController:viewController animated:YES])我收到此错误:@H_404_3@
* Terminating app due to uncaught exception ‘NSInternalInconsistencyException’,reason: ‘-[UIViewController
_loadViewFromNibNamed:bundle:] loaded the “About” nib but the view outlet was not set.’@H_404_3@
这是也触发viewDidLoad的调用.很明显,在通话过程中,视图首先是非零的(应该是这样),后来显然再次变为零.@H_404_3@
如果我在调用之前立即在调试器中键入po [viewController视图],我会收到此错误(这可能只是同一症状的另一个表示):@H_404_3@
error: Execution was interrupted,reason: internal ObjC exception
breakpoint(-3).. The process has been returned to the state before
expression evaluation.@H_404_3@