I am trying to put a UIViewController‘s view on my window object (in AppDelegate).
splitViewController = [[SplitViewController alloc] initWithNibName:@"SplitViewController" bundle:nil];
self.window.rootViewController = self.splitViewController;
What I did, i made an .xib with .h and .m, a subclass of UIViewController. Then I inserted a UISplitViewController‘s object to my xib and made a same iVAR @property (strong) IBOutlet UISplitViewController *split; and connected them. But now I want to link UISplitViewController‘s view to File’s Owner’s view. But it’s not allowing me to do so.
What’s the reason behind it? Please solve, Thanks!
EDIT
Then I tried to put this code in viewDidLoad of SplitViewController:
self.view = self.split.view;
But again application crashes and gives following error
Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘-[UIViewController _loadViewFromNibNamed:bundle:] loaded the “SplitViewController” nib but the view outlet was not set.’
Set the view outlet in your XIB. The warnings aren’t all jibberish.