The Split View Controller
UISplitViewController class is a view controller that simply manages the presentation of two side-by-side view controllers in Landscape orientation — it is, in this respect, a container controller. It has no interface — its job is to coordinate the presentation of its two view controllers and to manage the transitions between different orientations.
Using this class, a view controller is created on the left which is referred to as the Master view (and is named that in the template), which presents a list of items, and another view controller on the right, which presents the details, or content, of the selected item and which is referred to as the Detail view, (and is named that in the template).
After you create and initialize a
UISplitViewController object, you assign two view controllers to it by using the
viewControllers property — an array that contains the two (and only the two) controllers. The first view controller (index
0) is displayed on the left side (in the case of RoadTrip, the
RTMasterViewController) and the second view controller (index
1) is displayed on the right side (the
All of this is set up for you in the storyboard. (See Figure 13-9) You’ll notice that both of the view controllers managed by the Split View controllers are embedded in Navigation controllers, which is why when you select a cell in the
RTMasterViewController view, a Navigation bar appears with a Back button (in either the Master or Detail ...