5 View Controllers

A view controller is an instance of a subclass of UIViewController. A view controller manages a view hierarchy. It is responsible for creating view objects that make up the hierarchy and for handling events associated with the view objects in its hierarchy.

So far, WorldTrotter has a single view controller, ConversionViewController. In this chapter, you will update it to use multiple view controllers. The user will be able to switch between two view hierarchies – one for viewing the ConversionViewController and another for displaying a map (Figure 5.1).

Figure 5.1  The two faces of WorldTrotter

The two faces of WorldTrotter

Get iOS Programming: The Big Nerd Ranch Guide 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.