Click through in order to find out a practical solution to fighting the monster which is UI View Controller.
The code used for the demo:
https://github.com/yopeso/FightingMonster
Watch the video here:
https://www.youtube.com/watch?v=QaYB2S5djV8
40. • Use View Models to encapsulate the information the view displays
• Put the IBOutlets in the private interface
• Create classes for views
• Use XIBs to define your layout
• Use a delegate to communicate asynchronous events from the view
• View keeps the datasources
Separate View from View Controller
41. • Testable View Controllers
• Ability to change the View without touching the View Controller
• More granular code
• It plays well with MVVM and VIPER concepts
Advantages
42. • Cannot use storyboards
• May lead to class explosion
• Requires some glue code
Disadvantages