The delegation pattern is one of the most common design pattern in iOS. You probably use it on daily basis without noticing, every time you create a UITableView or UICollectionView and implementing their delegates. Let’s see how it works and how to implement it in Swift.
During this year, I have blogged quite a bit about code architecture in Swift and I’ve realised that I didn’t explain much about which design pattern to use with it. In a serie of coming posts, I will cover different design patterns, starting now with observer.