0

Apple says in a ref I should use -init. But that seems to go against the convention of always using the designated initializer. Since it doesn't have any, it would be the one from the superclass which is UIViewController, right? And there, it is -initWithNibName:bundleName:, if I'm fully awake right now.

However, when calling that with nil and nil, the UISplitViewController is fully black. When I call -init insetead, it works perfectly. Don't get it.

Proud Member
  • 38,700
  • 43
  • 143
  • 225

2 Answers2

1

See here: Stick UISplitViewController in its own XIB?

Might help you. It seems you just cannot and should not do it that way. I'm experiencing the same black screen when trying it. Put it to the main XIB and you're fine. Weird though.

Oh, and also see this: UISplitviewcontroller not as a rootview controller

It strengthens my belief: it is not possible. Odd.

René

Community
  • 1
  • 1
Krumelur
  • 29,920
  • 21
  • 114
  • 240
0

In my case, i was not calling

[window makeKeyAndVisible];

after

[window addSubview:self.splitViewController.view];

which caused the black screen. I was initializing it as

self.splitViewController = [[UISplitViewController alloc] init];

Adding [window makeKeyAndVisible]; fixed the problem.

Chintan Patel
  • 3,115
  • 3
  • 27
  • 36