Note that there are some explanatory texts on larger screens.

plurals
  1. POUISplitViewController within a UITabBarController orientation problem
    text
    copied!<p><strong>Backstory</strong> I know there are a lot of topics about this subject, but reading all of them didn't answer the problem. So the purpose of this 'question' is to combine all that we know to hopefully fix this issue.</p> <p><strong>Main issue</strong> When you create a UISplitViewController and add it to UITabBarController it will work fine in Portrait mode (even if you swap from portrait to landscape and back). However if the iPad launches in landscape mode all hell breaks loose and no view will load properly.</p> <p><strong>Bug?</strong> When looking at Apple's documentation they had the following to say: </p> <blockquote> <p>The split view controller’s view should always be installed as the root view of your application window. You should never present a split view inside of a navigation or tab bar interface.</p> </blockquote> <p>So the answer to the question if this is a bug is simple, no it ain't. We are trying to accomplish something that wasn't intended by Apple. Personally I have no idea why because it seems to work fine when launched in portrait mode.</p> <p><strong>Easiest work around</strong> Probably the easiest work around to this problem is to open the Info.plist and remove all the 'Supported interface orientations (iPad)' for landscape mode. It will launch in portrait mode but will immediately switch to landscape mode (if you hold it that way) and the problems seem to be gone.</p> <p><strong>Now what?</strong> The main question now is, how can we still launch in landscape mode without the problem? Please no link to framework files but the real work-around code. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload