self.one=[[SSone alloc] init];
[self addChildViewController:self.one];
[self.view addSubview:self.one.view];
当程序执行 [self.view addSubview:self.one.view] 时,出现问题。当我输入'po self.one.view'时,结果是
(lldb) po self.one.view error: Execution was interrupted, reason:
EXC_BAD_ACCESS (code=2, address=0x7fff57e94ff8).
The process has been returned to the state before expression evaluation.
答案 0 :(得分:0)
在致电[self.view addSubview:self.one.view];
之前,您必须致电:
[self.one didMoveToParentViewController:self];