When creating the initial view in iPhone applications you can set the IBOutlet rootViewController property of the main UIWindow to your default view controller, but this doesn't work with a UISplitViewController.
If I do this I don't receive any compile errors, and the app runs, but no screen is displayed on app startup.
The way recommended by the Apple docs for UISplitViewController is to do the following within your app delegate launch method:
[window addSubview:splitViewController.view];
I was just wondering why UISplitViewController needed this different approach.
Of course that works. In fact, it's what the Split View-based Application template from Xcode 4.0.2 does (SDK 4.3).
Split view controllers are only intended for iPad, not iPhone, though. Are you trying this on an iPhone project?
Update
Since iOS 8 it is available on all devices.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With