Skip to content

Instantly share code, notes, and snippets.

Created May 18, 2017 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6c7dcd1f3a416cec0c543aaa83cf9532 to your computer and use it in GitHub Desktop.
Save anonymous/6c7dcd1f3a416cec0c543aaa83cf9532 to your computer and use it in GitHub Desktop.
the description for this gist
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