Graphics Programs Reference
In-Depth Information
Application Icons
Once the
Quiz
application is installed on your development device, return to the device's
Home screen. You'll see that its icon is a plain white tile. Let's give
Quiz
a better icon.
An
application icon
is a simple image that represents the application on the iOS desktop.
Different devices require different sized icons, and these requirements are shown in
Table 1.1 Application icon sizes by device
Device Application icon size
iPhone/iPod touch without Retina display 57x57 pixels
iPhone/iPod touch with Retina display
114x114 pixels
iPad
72x72 pixels
If you supply a single application icon image at 57x57 pixels, that image will be scaled up
on devices where a larger icon is required. This is never good. A scaled-up icon will be
pixellated and scream, “We're amateurs!” to your customers. Therefore, any application
you deploy to the App Store should have an icon for every device class on which it can run.
We have prepared two icon image files (sizes 57x57 and 114x114) for the
Quiz
application.
You can download these icons (along with resources for other chapters) from
ht-
zip
iOSProgramming3ed.zip
and find the
Icon.png
and the
Icon@2x.png
files
in the
Resources
directory of the unzipped folder. (If you open these images, you'll see
that they aren't glossy and don't have rounded corners like other application icons. These
effects are applied for you by the OS.)
Now you're going to add these icons to your application bundle as
resources
. In general,
there are two kinds of files in an application: code and resources. Code (like
QuizViewController.h
and
QuizViewController.m
) is used to create the ap-
plication itself. Resources are things like images and sounds that are used by the applica-
tion at runtime. XIB files, which are read in at runtime, are also resources.
In the project navigator, select the
Quiz
project, which is at the top of the list and slightly
shaded. Then, in the editor area, select
Quiz
from under the
Targets
heading. Finally, select
Summary
from the top of the editor area (
Figure 1.24
).