MyPlatesViewController* viewController = [[MyPlatesViewController alloc] initWithNibName:@"MyPlates" bundle:nil ];
[self.view addSubview:viewController.view];
然后删除我的viewController如何正确删除UIViewController?
[self.view removeFromSuperview];
但漏仪显示20 MB内存
有什么不对?
将视图添加到另一个视图时,控制器不会保留在视图中。只保留视图,所以上面的代码会导致问题。 – executor21 2010-12-10 19:20:07
确实你是对的。看起来原来的海报正在以意想不到的方式使用视图控制器。 – DigitalBytes 2010-12-10 19:34:49