Skip to main content

Keeping ViewController files small

If you’re working on a complex iOS app, it’s very easy to create a UIViewController subclass with a huge amount of code. One of the many code guidelines I learned at Google was the simple idea of keeping functions and files small. For example, I would recommend trying to keep the vast majority of your functions around 40 lines or less, and trying to keep all of your files under 1000 lines. This post presents a technique that can help you achieve smaller file size.

Bynomial Code

Comments