我使用
添加了子视图myViewController *myVC = [[myViewController alloc] initWithNibName:@"myView" bundle:nil];
[self addSubview:myVC.view];
[myVC release];
如何从myViewController方法中再次删除它?
我试过
[self.view removeFromSuperview];
但这不起作用
答案 0 :(得分:4)
试试这个:
[myVC.view removeFromSuperview]