I'm not sure if this is a bug with my code or UIKit, but I can't seem to get my app to consistently output the second UIWindow instance to the attached screen. I've read everything at http://developer.apple.com/library/ios/#qa/qa1738/_index.html#//apple_ref/doc/uid/DTS40010848 and my code matches the pattern, but there is one instance in particular where it get开发者_开发知识库s "stuck" mirroring and won't display the correct window on the second screen -- it displays only the mirror of the iPad's screen.
This is on iOS 4.3.5 on a GSM iPad 2.
Scenario 1 - iPad 2 is plugged into the screen from the springboard. It is mirrored. Launching the app results in the correct behavior of showing one UIWindow on the iPad 2 and the other on the external screen.
Scenario 2 - App is launched not plugged into screen. Plugging in the screen results in the correct behavior.
Scenario 3 - App is open and displaying correct behavior on screen. Unplugging from the screen, waiting a few seconds, and then re-plugging in the screen results in the screen becoming a mirror. The code that assigns the UIWindow to that screen is run, but the readonly mirrored property of it already is true.
Scenario 4 - App is plugged into the screen and is resumed from the springboard. The external screen displays correctly.
Any ideas?
精彩评论