Looking for a solution to an autorotation issue using UISplitViewController. The steps to re-create are:
- Using Xcode 4.5+ and the iOS6+ SDK, create a new project using the "Master-Detail Application: template.
- Add a new view controller to the project with a XIB file that is full screen in size.
- Add a button to the detail view controller that presents the new view controller full screen using -presentViewController:animated:completion:
- Add a button to the new view controller that dismisses the itself using dismissViewControllerAnimated:completion:
- Start the app with the iPad in landscape mode and hit the button created in step 3 in the detail view that presents the new view controller.
- While viewing the full screen view controller, rotate the iPad to portrait and then tap the button added in step 4 to dismiss the new view controller.
THE PROBLEM: Using these steps, both the master and detail view controller will auto-rotate but the master view controller will stay on the screen in an unresponsive state and taking up a frame in the upper left of the screen that is the same size as it was in landscape mode. By using a gesture from the left side of the iPad, the correct master view controller will be displayed and the issue is cleared.
We have been able to use viewWillAppear and viewDidDisappear in the new view controller to make the phantom master view controller hide, but even with that fix, the "Master" button that the template provides in portrait remains unresponsive after following the above steps, and we have traced it to the fact that the region of the screen in the upper left taken up by the master view controller prior to the fix is unresponsive to touch.
We have tried a few attempts at resigning the first responder in different ways but have had no luck completely fixing the issue.
NOTE: This issue only usually happens if the above Steps 5-6 are followed when first launching the app. Repeating step 6 within a single app launch usually does not result in the issue every time. It is repeatable on every launch of the app.