Last active
March 1, 2018 21:22
-
-
Save gspiers/67171370fbf55f60aca35b06ee578d54 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Stringly typed 💩 | |
// This throws an Obj-C exception and crashes if you get the name wrong. It would be better if it returned an optional. | |
let bootstrapRootStoryboard = UIStoryboard(name: "BootstrapRoot", bundle: Bundle.main) | |
guard let appKilledViewController = bootstrapRootStoryboard.instantiateViewController(withIdentifier: "appKilledViewController") as? AppKilledViewController else { | |
fatalError("Unexpected viewcontroller for identifier 'appKilledViewController'") | |
} | |
// Strongly typed using SwiftGen 😀 | |
let appKilledViewController = StoryboardScene.BootstrapRoot.instantiateAppKilledViewController() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment