Created
April 5, 2017 00:54
-
-
Save gracietti/502fb48a2021ddd8faa3898c48a46959 to your computer and use it in GitHub Desktop.
Add this extension to the Storyboard
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 Foundation | |
import UIKit | |
extension UIStoryboard { | |
func instantiateViewController<T: UIViewController>() -> T where T: ReusableView { | |
return instantiateViewController(withIdentifier: T.reuseIdentifier) as! T | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment