2.2. Existing Templates

By default, every sample application created with Xcode uses a template created by Interface Builder. This template serves as the major source of information about your application's main screen layout and subsequent window hierarchy. It establishes the key window that users see when your application starts, but also allows you to define which actions trigger transitions to different views. Xcode can build a hierarchy for your UI without having to write a single line of code!

To get started on your UI, use Xcode to create a new window-based application named Example. This will create a directory named Example containing the skeleton of your application.

Each sample application is created with a MainWindow template. This template represents the main window object that is loaded and displayed when the application is started. The template name is assigned to your application from the Info.plist file, found in the Resources section of your Xcode project. The MainWindow template is specified as a filename, but without the .xib extension, as shown below:


Click the Resources folder within your project. You'll then see a file named MainWindow.xib. This is the Interface Builder template file. Double-click the file to open it in interface builder.