Created
February 11, 2019 16:19
-
-
Save morpheby/9745e7df426e1fc24e03d0a290b5c245 to your computer and use it in GitHub Desktop.
This file contains 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 | |
extension UIViewController { | |
func wire(segue: UIStoryboardSegue, with sender: Any?) { | |
guard let activationClosure = sender as? (UIViewController) -> Void else { | |
fatalError("Architectural failure. Can't prepare router") | |
} | |
activationClosure(segue.destination) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment