Skip to content

Instantly share code, notes, and snippets.

@jazzedge
Last active December 2, 2017 06:13
Show Gist options
  • Save jazzedge/9d31fa7a16f0ad3812b66150996fbbdd to your computer and use it in GitHub Desktop.
Save jazzedge/9d31fa7a16f0ad3812b66150996fbbdd to your computer and use it in GitHub Desktop.
See: https://makeapppie.com/2016/09/23/why-do-we-need-delegates-in-ios-and-watchos/
See: https://makeapppie.com/2016/06/27/using-segues-and-delegates-for-navigation-controllers-in-swift-3-0/
Delegation uses protocols. Protocols are a set of properties and methods that while declared in one place, another class implements. They allow for a layer of abstraction. A class adopts a protocol to do something. The protocol defines what the something is. The adopting class will have the code how it gets done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment