Delegation in Swift — Swift by Sundell

The delegate pattern has long been very prominent on Apple's platforms. Delegation is used for everything from handling table view events using UITableViewDelegate, to modifying cache behavior using NSCacheDelegate. Just like the observer pattern, the delegate pattern can be implemented in many different ways. John Sundell takes a look at a few of those ways, along with their pros and cons.


Want to receive more content like this in your inbox?