UIKit does not release the controller if it is not removed by animation?

In an application based on a tab bar. If I have one controller that is inserted into the navigation stack from one tab, and then, when another tab is active, I try to pull this controller out, it does not release unless I pulled it out without animation.

It works:

[navigationController popToRootViewControllerAnimated:NO]; 

And this is not so:

 [navigationController popToRootViewControllerAnimated:YES]; 

Does anyone know what is going on here? Is the animated parameter used incorrectly?

UPDATE:

Apple informed me that this is really a mistake in UIKit, and they marked it as urgent and assigned it to someone. This may have been allowed in recent releases, but I did not have time to check.

+6
objective-c iphone uitabbarcontroller uinavigationcontroller
source share
2 answers

what Dsuci offers is correct. If you want the notifications to be deleted, this is best called in the viewDidUnload method of the controller. This method is called when the controller is unloaded from the stack. I am simply quoting this because we cannot vote for the comment as an answer.

0
source share

If the main issue is observable notifications, why not remove the observers in the "- (void) viewWillDisappear: (BOOL) animated" method "?

0
source share

All Articles