PresentModalViewController from within UISplitViewController: weird behavior in landscape mode

Posted by Krumelur on Stack Overflow See other posts from Stack Overflow or by Krumelur
Published on 2011-01-04T11:48:40Z Indexed on 2011/01/04 11:54 UTC
Read the original article Hit count: 220

Filed under:
|

Hi,

I've been using PresentModalViewController a lot and never had any issues. But when showing a modal controller from within any controller hosted by a UISplitViewController I get strange orientation bugs.

In my table view (which is root controller of the UISplitView), when a cell is touched, I call:

MyController oModal = new MyController();
oModal.ModalPresentationStyle = UIModalPresentationStyle.FormSheet;
oModal.ModalTransitionStyle = UIModalTransitionStyle.CrossDissolve;
this.PresentModalViewControll(oModal, true);

If the iPad is in Portrait, all is okay. If it is in landscape however, the modal controller fades in but its orientation is incorrect. Then, after fading in has finished, it suddenly flips 90 degrees and adjusts to correct orientation. I have overriden ShouldAutoRotateToInterfaceOrientation(), so that cannot be it.

Ideas?

René

© Stack Overflow or respective owner

Related posts about cocoa-touch

Related posts about monotouch