I've UINavigationController which holds 2 UIViewControllers, second is pushed on the first. I want to replace this navigation controller with a new one, but I need to release existing view controllers from memory first. Currently I remove view with this code:
In this case only top view controller gets its ViewDidDisappear method called, but first controller doesn't and it stays in memory. I've tried calling RemoveFromParentViewController method for both view controllers, but it doesn't call ViewDidDisappear method for any of them!
All this scenario is to do when I'm trying to replace existing detail view controller with a new one. We have a custom built split view controller and when row is selected in master view I create new UINavigationController and set it to DetailViewController of our split view. I don't know how UISplitViewController from SDK handles it, but I imagine it would be the same, e.g when replacing detail view controller with a new one any non top view controllers would never get their ViewDidDisappear methods called.
Any advice is appreciated.