9. View Controllers

The BrowseOverflow app now has a very stable base, because all the model and “business logic” code has been grown using tests. Many people attempting to adopt app-wide unit testing practices of any form—including TDD—get despondent when moving “higher up” in the app toward the controller and view layers. How can code that is supposed to interact with a user be subjected to automated testing? That is exactly what you’ll find out in this chapter as we build up the view controllers and associated objects.

Class Organization

Each of the views shown and described in Chapter 5, “Test-Driven Development of an iOS App,” is basically the same: There’s a table, whether it’s a table of topic names, of question titles or the question ...

Get Test-Driven iOS Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.