"Application tried to present Split View Controllers modally"
ios, ipad, uisplitviewcontroller
Solution
The `UISplitViewController` has to be always the root view controller, and cannot be presented modally. See Apple docs, that says:
A split view controller must always be the root of any interface you create. In other words, you must always install the view from a UISplitViewController object as the root view of your application’s window. The panes of your split view interface may then contain navigation controllers, tab bar controllers, or any other type of view controller you need to implement your interface. Split view controllers cannot be presented modally.
Problem
I am still trying to find a solution to what is theoretically a very simple task and that is going from a UIViewController to a Split View Controller. (Why have apple made this so difficult). I am at a stage where I now put the SplitViewController into its own storyboard. And when user selects a button on the single UIView Controller I call the following code: ``` UISplitViewController *splitVC = [[UIStoryboard storyboardWithName:@"SplitStoryBoard" bundle:nil] instantiateViewController]; [self presentViewController:splitVC animated:YES completion:nil]; ``` So I want to load the storyboard with the splitview controller. But this also crashes with "Application tried to present Split View Controllers modally" I did not specify any "modal" action in the code. Is there any solution for how to do this ?