Created
June 29, 2018 12:26
-
-
Save jonathanduty/b10ee8b20aab686bb7ea8913068babb8 to your computer and use it in GitHub Desktop.
UIStoryboard+Extensions.swift
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
import UIKit | |
extension UIStoryboard { | |
static func fromStoryboard(named: String) -> UIViewController? { | |
return UIStoryboard(name: named, bundle: nil).instantiateInitialViewController() | |
} | |
static func fromStoryboard(named: String, get: String) -> UIViewController? { | |
return UIStoryboard(name: named, bundle: nil).instantiateViewController(withIdentifier: get) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment