Skip to content

Instantly share code, notes, and snippets.

@byJeevan
Last active December 23, 2018 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save byJeevan/b90d8ad12a3b50cb33e097e3078517d3 to your computer and use it in GitHub Desktop.
Save byJeevan/b90d8ad12a3b50cb33e097e3078517d3 to your computer and use it in GitHub Desktop.
/* 1. Extending protocol from default implementation */
extension SomeType {
// new functionality to add to SomeType goes here
}
/* 2. Adopting Multiple Protocols */
extension SomeType: SomeProtocol, AnotherProtocol {
// implementation of protocol requirements goes here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment