为什么在 awakeFromNib 方法中添加子视图会导致它进入无限循环?应该在哪里添加子视图?谢谢。
- (void)awakeFromNib
{
outlineViewController = [[OutlineViewController alloc] initWithNibName:nil bundle:nil];
NSArray *subViews = [leftView subviews];
if ([subViews count] > 0)
{
[[subViews objectAtIndex:0] removeFromSuperview];
}
[leftView addSubview:outlineViewController.view];
}