O'Reilly logo

Beginning iOS 5 Application Development by Wei-Meng Lee

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

THE SINGLE VIEW APPLICATION TEMPLATE

When you create a Single View Application project using Xcode, you automatically have a single view in your application. Until now, you have been using it without understanding much about how it works under the hood. In the following Try It Out, you will dive into the details and unravel all the magic that makes your application work.

TRY IT OUT: Creating a Single View Application Project

image

  1. Using Xcode, create a Single View Application (iPhone) project (see Figure 4-1) and click Next.

    image

    FIGURE 4-1

  2. Name the project SingleViewBasedApp. Set the Class Prefix to be SingleViewBasedApp and ensure that you have the Use Automatic Reference Counting option unchecked. Click Next and then Create.
  3. Press Command-R to test the application on the iPhone Simulator. The application displays an empty screen, as shown in Figure 4-2.

How It Works

What you have just created is a Single View Application project. By default, the Single View Application template includes a single View window, controlled by a View controller class.

First, take a look at the files and folders created for your project in Xcode. In particular, note the folders and files listed under the project name (see Figure 4-3).

FIGURE 4-2

FIGURE 4-3

As you can see, many files are created for you by ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required