This is a very common question. If you follow the MVC pattern, like all the tutorials and Apple sample code, your view controllers conform to a lot of protocols.
UICollectionViewDelegate are the most common ones.
If your UI collects user inputs, you also have
What if you show a map? You can count on having
Almost all apps fetch data from APIs, so you also have some of these:
I can keep going, but let’s just stop here.
Your view controllers conform to many of these Apple provided protocols, plus any custom protocols you define for your app. Each of these protocols has several delegate methods your view controllers need to implement. It can easily get out of hand.
This is one reason contributing to your massive view controllers. Let’s see how Clean Swift tackles this problem.
Continue reading →