THE EMPTY APPLICATION TEMPLATE

In this section, you discover another type of application template you can create using the iOS SDK: the Empty Application template. Unlike the Single View Application template, the Empty Application template does not include a View controller by default. Instead, it provides only the skeleton of an iOS application — you need to add your own views and their respective View controllers. Therefore, an Empty Application project presents a good opportunity for you to learn how View controllers work and appreciate all the work needed to connect the View controllers and XIB files. When you understand how View controllers work, you will be on your way to creating more sophisticated applications.

To put first things first, execute the following Try It Out to create an Empty Application project and then progressively add a View controller to it.

TRY IT OUT: Creating an Empty Application Project

image

  1. Using Xcode, create an Empty Application (iPhone) project (see Figure 4-6) and name it EmptyApp. You must also use the project name as the Class Prefix. Ensure that you have the Use Automatic Reference Counting option unchecked. Observe the files created for this project type (see Figure 4-7). Apart from the usual supporting files, note that there are only two delegate files (EmptyAppAppDelegate.h and EmptyAppAppDelegate.m).

    FIGURE 4-6

  2. Press Command-R to test the ...

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.