Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SiarheiFedartsou/975a3776801d7bbe21248d64b15058cc to your computer and use it in GitHub Desktop.
Save SiarheiFedartsou/975a3776801d7bbe21248d64b15058cc to your computer and use it in GitHub Desktop.
protocol Fooable {
func foo() -> String
}
extension Fooable where Self : UIViewController
{
func foo() -> String
{
return "foo"
}
}
class ViewController: UIViewController, Fooable {
override func viewDidLoad() {
super.viewDidLoad()
print(self.foo())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment