Setting RootViewController in Appdelegate

Viewed 10735

I have storyboard in my application, but i don't want to set the Main storyboard file base name in info.plist, as well as I don't want to set the entry point i.e Is Initial View Controller in storyboard for any viewcontroller scene.

Though I want to launch the app with some scene from the storyboard, but all shows me a black screen.

When I tried

let testob:testClass = testClass()
self.window?.rootViewController = testob

in AppDelegate, it didn't worked and got the same black screen.

But when I set the Main storyboard file base name in info.plist, and the entry point i.e Is Initial View Controller in storyboard every thing works.

Is there any solution to do so?

3 Answers
Related