mirror of
https://github.com/lil-org/tokenary.git
synced 2024-12-14 22:45:54 +03:00
12 lines
419 B
Swift
12 lines
419 B
Swift
|
// Copyright © 2021 Tokenary. All rights reserved.
|
||
|
|
||
|
import UIKit
|
||
|
|
||
|
enum Storyboard: String {
|
||
|
case main
|
||
|
}
|
||
|
|
||
|
func instantiate<ViewController: UIViewController>(_ type: ViewController.Type, from storyboard: Storyboard) -> ViewController {
|
||
|
return UIStoryboard(name: storyboard.rawValue.withFirstLetterCapitalized, bundle: nil).instantiateViewController(withIdentifier: String(describing: type)) as! ViewController
|
||
|
}
|