Created
March 27, 2017 16:52
-
-
Save JohnSundell/59ee3b9f7ba1e3211c43e5d9370c2ea5 to your computer and use it in GitHub Desktop.
Code sample #4 from https://medium.com/@johnsundell/type-erasure-using-closures-in-swift-1e6125231f8
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
class ViewController: UIViewController { | |
init<T: ModelLoading>(modelLoader: T) where T.Model == MyModel { | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment