2.3. New Templates

To create a new Interface Builder project from a template, select New from the File menu. A window will prompt you to choose the type of template you want to create, as shown in Figure 2-1. Interface Builder templates will be created for you automatically and placed in your project directory.

Figure 2-1. Interface Builder template selection window


The Cocoa Touch class of templates is specifically geared for iPhone applications. After you select it, the following types of templates will be available:



Application

Builds an application template, including a primary application delegate and a main window. The application delegate will receive notifications when the application is launched, suspended, or terminated. The main window provides a primary view port to display a view on the screen. Use this template if your application will have just a single screen. You will need to build a view to layer on top of the window, which will be explained next.



View

Builds a single view within an application. Use this if you're creating a single view screen for an application window, or for each view within an application having many views.



Window

Template for building windows only. Use this if you'll be manually laying out your views on a single screen. Windows cannot hold individual controls, so if you plan on using them, you'll need to first create a view.



Empty

An empty template, allowing you to create anything you like from scratch.