I am working on an iPad application. Please help me.
I have a normal split view with Root and Detail views. From the Detail view, I pop up another Child view using presentpresentModalViewController.
I start the app in Portrait mode. Then after the Child view is popped up, I rotated the iPad to Landscape mode. The Child view rotated fine because it received the rotating event. Then I close the Child view (with "Done" button).
BUT the split view DID NOT receive the rotating event so it did not know that it is now in Landscape mode. So, what happens at that time after I close the Child view: The window is split is half. The left side (Root) is just black. The right side (Detail) is still there (with the popover button still there).
I added codes to get rid of the Popover button in the Detail view in that case. BUT I don't know how to make the Root view appear. I guess the solution would be.... how to tell the split view that the rotation has been changed, since the rotation was done while it was in the Child view???
Any suggestion is appreciated. I am very new to Objective-C. Thanks so much!!
Summary
- Start in Portrait mode
- Click button in Detail view
- Present modal Child view
- Rotate to Landscape
- Close modal Child view
- Splitview not displayed correctly in now landscape mode (see photo please)