I'm still trying to figure out some iOS 5 vs iOS 4 problems in this incredibly (and unnecessarily) complicated app.
I've traced one problem down to the fact that a controller (which happens to be the navigation controller of the calling class) has a parentViewController
attached prior to being "sent" a presentModalViewController request, but on the other side of that (in viewWillAppear
of the "presented" controller -- haven't even returned from the call) the navigation controller (I've verified that it's the same address) suddenly has a nil parentViewController
.
I'm reasonably certain that this behavior did not occur in iOS 4 (I've been ping-ponging back and forth between the two versions to verify behaviors).
The code is far too complicated to include here, but the call is:
[self.navigationController presentModalViewController:messageViewController animated:[self isAnimated]];
There are assertions prior to the call that the parentViewController
of the nav ctlr is non-nil, and likewise in viewWillAppear
. The assertion only fails in viewWillAppear
.
It was in the manual: Change in iOS5
More good information about this iOS5 change: http://omegadelta.net/2011/11/04/oh-my-god-they-killed-parentviewcontroller/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With