The Delegation Pattern in Swift
Imagine you are building an app that only has 2 View Controllers. Your initial view controller (View Controller 1) contains:
(1) a label and (2) a button titled “Change Label Text”.
There are many ways to pass data and communicate between classes when developing an iOS app. So far, I have primarily relied on delegates and segues to communicate between my classes and pass data. However, I recently came across another great tool that gets the job…