Skip to content

Instantly share code, notes, and snippets.

@alexpaul
Created June 2, 2018 21:50
Show Gist options
  • Save alexpaul/5bbc198bd753d3eb094a16b30384d888 to your computer and use it in GitHub Desktop.
Save alexpaul/5bbc198bd753d3eb094a16b30384d888 to your computer and use it in GitHub Desktop.
Returns the instance of a storyboard view controller
public static func storyboardInstance() -> CustomViewController {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let customViewController = storyboard.instantiateViewController(withIdentifier: "CustomViewController") as! CustomViewController
return customViewController
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment