Search code examples
iosipaduitabbarcontrolleruipopovercontroller

UITabBarController and UIPopover Screen Flashes White


I'm running into a unique bug:

I have a UITabBarViewController that I have presented with presentViewController:animated:completion:

(I'm presenting it fullscreen in this way, because the presenting view controller only permits landscape orientations, while the presented tab bar vc permits all orientations. So when you dismiss the presented tab bar vc and return to the presenting vc, it will flip back to landscape automatically.)

When I switch between the tabs in the UITabBarViewController, the first time that tab displays, it flashes white for a split second (on the device) or fills the screen with white (on the simulator).

Also, when I display a popover, it makes the screen flash white for a split second (device and simulator).

The presenting view draws GL in itself normally, but it stops the draw loop when it presents the tab view controller.

...I haven't been able to nail down what could be causing this. The app is pretty legacy, coded originally for iOS 4.3, and I'm upgrading it to iOS 8. I'd rather not throw out and redo large chunks of it because of this bug, so if anyone has a clue as to what might be happening, I'd appreciate sharing it.


Solution

  • This is silly, but after three hours I found the answer: one of the xib files that I was loading had an extra Window object in it; that was causing it to flash white before it was thrown away/drawn over.