Created
June 2, 2018 21:50
-
-
Save alexpaul/5bbc198bd753d3eb094a16b30384d888 to your computer and use it in GitHub Desktop.
Returns the instance of a storyboard view controller
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
| 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