3
去除
我添加子視圖控制器如下後childViewController沒有得到釋放:從parentViewController
loginViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"LoginViewController"];
loginViewController.delegate = self;
[self addChildViewController:loginViewController];
[self.view addSubview:loginViewController.view];
loginViewController.view.frame = self.view.bounds;
[loginViewController didMoveToParentViewController:self];
,並按如下取出:
[loginViewController willMoveToParentViewController:nil];
[loginViewController.view removeFromSuperview];
[loginViewController removeFromParentViewController];
如果我理解正確的話,應能觸發的dealloc在LoginViewController中,但它不?我錯過了什麼嗎?
你碰巧解決了你的問題嗎? – jbouaziz
@jbouaziz我不記得問題是如何解決的,但是我確實得出了一個結論這個 – 2cupsOfTech