Information Technology Reference
In-Depth Information
Older models of the iPhone—the 2.x, 3G, and the iPod Touch second generation support OpenGL ES 1.5 code
only. In practice, you add your backward-compatible code to ESRenderer1.m and current code to ESRen-
derer2.m . Alternatively, you can comment out the renderer selection and force your project to run the older
code, which is supported on all hardware but lacks some of the powerful features in the OpenGL ES 2.2 spe-
cification.
The default code in both renderer files draws a colored square and also maintains an animation counter. The
wrapper view includes an animation timer that calls each renderer repeatedly. Your rendering code is respons-
ible for calculating the updated view at each animation frame.
Using the SplitView-based template
The SplitView-based template illustrated in Figure 3.14 is the iPad equivalent of the Navigation-based template.
The iPad's larger screen makes it possible to view a list of menu items in a split view, which is next to a detail
view that can display relevant information for each item or for the application as a whole. Navigation code is
similar to that used in the Navigation-based template. When the iPad is vertical or in portrait mode , the split
view appears when the user taps the navigation button at the top left, floats above the detail view, and disap-
pears when the user taps outside it. When the iPad is horizontal landscapemode , the split view always appears
at the left.
TIP
Search WWH ::




Custom Search