I was looking for a way to programmatically set my initial view controller using Storyboards. I found this solution: Programmatically set the initial view controller using Storyboards
This works just liked I want it to but after using the Swift answer provided in that topic:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
let mainStoryboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
var exampleViewController: ExampleViewController = mainStoryboard.instantiateViewControllerWithIdentifier("ExampleController") as! ExampleViewController
self.window?.rootViewController = exampleViewController
self.window?.makeKeyAndVisible()
return true
}
When loading the view for the first time the framework that used to work won't work anymore: SwiftLoader. https://github.com/leoru/SwiftLoader
However when I load the same view for the second time the SwiftLoader plugin does activated.
I load SwiftLoader like so:
SwiftLoader.show(title: "Loading...", animated: true)
I've the feeling that it has to do with the code above creating a UIWindow instead of whatever Storyboard used to (UIView?) do but I've no idea as to how to fix this?