THE MASTER-DETAIL APPLICATION TEMPLATE

Beginning with the iOS SDK 3.2, a new application template exclusive to the iPad became available: Split View-based Application. It enables you to create a split-view interface for your iPad application, which is essentially a master-detail interface. The left side of the screen displays a list of selectable items, while the right-side displays details about the item selected. In iOS 5, Apple has merged the Split View-based Application template with the existing Navigation-based Application template, calling it the Master-Detail Application template. In essence, when your Master-Detail Universal application is run on the iPhone, it will behave just like a Navigation-based application. When it is run on the iPad, it will behave like a Split View-based application.

To see how the Master-Detail Application template works, take a look at the following Try It Out.

TRY IT OUT: Creating a Master-Detail Application

image

  1. Using Xcode, select the new Master-Detail Application template (see Figure 4-18). Click Next.

    image

    FIGURE 4-18

  2. Name the project MasterDetail and select the Universal device family (see Figure 4-19). Recall that you also use the project name as the Class Prefix and must ensure that you have the Use Automatic Reference Counting option unchecked. ...

Get Beginning iOS 5 Application 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.