In this example we will see how a base class can hand off functionality to a secondary class using a delegate. The secondary class will be able to pass data back to the base class while the two classes are decoupled.
You can read my full blog post here:
https://www.devrazor.com/post/delegation-in-swift-passing-data-between-two-view-controllers