Created
January 20, 2016 16:26
-
-
Save esttorhe/e7f396c30f6b3a77e181 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
protocol MyProtocol { | |
func setup() | |
} | |
extension MyProtocol where Self: UIViewController { | |
func setup() { | |
// Do something here | |
} | |
} | |
class MyViewController: MyProtocol { | |
override func viewDidLoad() { | |
setup() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment