O'Reilly logo

iOS App Development Portable Genius by Richard Wentk

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

Understanding Xcode’s Project Templates

Although you can build an app from scratch by adding files to an empty project, it’s faster and more productive to flesh out a ready-made app skeleton.

Xcode includes a selection of app templates to get your projects started. The templates don’t do much, but they create a very basic app that you can expand by adding more features.

Creating iPhone, iPad, and Universal projects

Figure 3.6 shows the new project options page, highlighting the menu that selects whether your new project will run on an iPhone, an iPad, or both platforms. (The iPhone option is compatible with iPod touch devices.)

9781118462133-fg0306.tif

3.6 Use the Device Family menu to select the target device.

The structure of iPad and iPhone templates is very similar. But the graphic design template—the nib file, introduced in preceding chapters—is configured differently to match the differing display resolutions of each device.

If you select the iPad option from this menu, you must select the iPad Simulator when you build and run it. This loads your app into a larger simulated iPad, shown in Figure 3.7.

In the figure, we’ve launched MyFirstApp in the iPad Simulator. The frame in the center appears only when you run an iPhone app in the iPad Simulator. True iPad apps fill the whole window.

genius_2c.eps

You can scale ...

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