Alex Rivera | Logout

Blank screen for iOS 5 tab after dismissing modal and coming back from background after a memory warning

Asked 2011-11-09T23:56:35.423
8
  1. Run a app with tabs using iOS 5 simulator or device
  2. Bring up a modal dialog
  3. Simulate memory warning (for devices go to some apps that are memory intensive)
  4. Switch to another app (if you have not done so already)
  5. Come back to the app
  6. Dismiss the dialog

You will see a blank screen (the window). Test project to demonstrate this bug / issue: http://github.com/chetanpungaliya/iOS-5-TestModal

Edit
Report

1 Answer

4

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

answered 2012-01-11T07:03:46.643

Your Answer