Created
September 13, 2018 18:08
-
-
Save rockbruno/b548a4f56b3fb88d2c63ef9a9ee5ff99 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
class CustomViewController<CustomView: UIView>: UIViewController { | |
var customView: CustomView { | |
return view as! CustomView | |
} | |
override func loadView() { | |
view = CustomView() | |
} | |
} | |
final class MyViewController: CustomViewController<MyView> { | |
override func loadView() { | |
super.loadView() | |
customView.delegate = self | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment