Created
May 18, 2017 06:29
-
-
Save anonymous/6c7dcd1f3a416cec0c543aaa83cf9532 to your computer and use it in GitHub Desktop.
the description for this gist
This file contains 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
enum Storyboards: String { | |
case MyStoryboard_1, MyStoryboard_2 | |
case MyStoryboard_3 | |
func instance() -> UIStoryboard { | |
return UIStoryboard(name: self.rawValue, bundle: Bundle.main) | |
} | |
func initialViewController() -> UIViewController { | |
return self.instance().instantiateInitialViewController()! | |
} | |
func viewControllerWithIdentifier(identifier: String) -> UIViewController { | |
return self.instance().instantiateViewController(withIdentifier: identifier) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment