Information Technology Reference
In-Depth Information
Run the Navigation-based template. The navigation controller creates the gray bar at the top of the UI, and the
table view generates the table cells under it. You need to add code to set the title, fill in the contents of the cells,
and respond when the user taps a cell.
Navigation is managed by an instance of UINavigationController , which handles movement through
the tree and displays a title and back/forward buttons. As a top-level item, the navigation controller is included
in the main window nib. Although it's not entirely obvious from the code, you typically modify the code in this
template so it loads another table view when the user taps a cell.
The Navigation-based template is iPhone only. For iPad projects, use the SplitView-based template—it has sim-
ilar features but supports the iPad's more complex navigation options.
Using the OpenGL ES template
The OpenGL ES template, shown in Figure 3.13, includes set-up and tear-down for an application that uses the
OpenGL ES graphics subsystem. OpenGL ES is used for games and for complex custom UIs. It's a specialized
high-performance graphics environment, and you can ignore it unless you need to create complex 3D or 2D an-
imations.
The graphics are wrapped inside a class called EAGLView , which selects and runs one of the two rendering
classes— ESRenderer1 and ESRenderer2 —which support OpenGL ES 1.5 and OpenGL ES 2.2 code, re-
spectively.
FIGURE 3.13
The code of the OpenGL ES template animates a moving shaded square. Significant set-up and tear-down code is
needed to make this animation possible.
Search WWH ::




Custom Search