You will see a blank screen (the window). Test project to demonstrate this bug / issue: http://github.com/chetanpungaliya/iOS-5-TestModal
I ran into this myself today and can't find any explanation other than it's an iOS 5 bug. After a bit of hacking, I found a workaround. Before you dismiss the modal view controller, change tabBarController.selectedIndex
to a different view controller index and then back again.
You can see this in a clone of your project at https://github.com/xjones/iOS-5-TestModal. I also submitted this to you as a pull request.
EDIT: added openradar report
Someone has also posted this on openradar: http://openradar.appspot.com/10529236
I too had the same issue and fixed it. The problem is that the outlets that we connect via xib are set to nil in viewDidUnload method. This method is called on all views that are not currently visible, when memory warning occurs. When we come back to those views, their viewDidLoad method is called again. The only way to fix this is to remove setNil methods from viewDIdUnload to dealloc method and everything will work fine.
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