IPad: SplitView does not rotate

I have the following setup:

  • A subclass UISplitViewController

    that creates master and verbose view controllers in the constructor.
  • Master and Detail view controllers that override shouldAutorotateToInterfaceOrientation

    to return YES

    .
  • The verbose controller implements the protocol UISplitViewControllerDelegate

    and deals with the popover.

I see two strange problems that can be related:

  • When the split view is opened (in portrait mode - by default on the simulator), the master view is visible. It doesn't have to be.

  • When I rotate the simulator, the view is not "correct".

Subclass UISplitViewController

does not override shouldAutorotateToInterfaceOrientation

. However, both presenters and view controllers do and return YES

.

Any ideas what I might be doing wrong? Is this a simulator bug?

+2


a source to share


2 answers


For everyone who landed here: This was happening because my split view controller view was not root. This is absolutely essential.



+1


a source


Make sure you enable the interface orientation you want to support. They can be found in the project settings under the Summary tab.



0


a source







All Articles