Information Technology Reference
In-Depth Information
As a lazy shortcut, all iPhone applications run automatically on the iPad using the built-in emulation mode,
which displays them in a half-sized sub-window. The sub-window can be zoomed to fill the screen, but this
doesn't increase the resolution—it simply makes iPhone apps look large, but fuzzy.
There's no iPad emulator for the iPhone; iPad apps don't run on an iPhone at all.
Using the Window-based Application template
The Window-based application template is a minimal template with just a window that contains a single label,
as shown in Figure 3.18. This is the only iOS template that includes a full universal option and can create a
single app that runs on both the iPhone and iPad.
FIGURE 3.17
The View-Based Application template is the most useful starting point for app design.
In fact this template simply creates two separate apps, with two separate nibs, and two app delegates The iOS
app loader automatically selects the appropriate nib for each platform at run time.
The template doesn't create any view controllers. So to create a true universal app you typically add two separ-
ate view controllers, each with a nib that defines a unique UI, and perhaps some shared data classes. You have
to add links between each view controller and its window in IB.
Introducing the Framework and Library templates
iOS supports only static libraries. You can't create or add a framework to an iOS project. As shown in Figure
3.19, OS X is less limited. You can create a Cocoa framework, a Cocoa library, a BSD C library, or a Standard
Template Library (STL) C++ project add-on. The Bundle option groups together a collection of Objective-C files
Search WWH ::




Custom Search