Information Technology Reference
In-Depth Information
Although you can use this template as is, it has some nonessential features. The navigation bar on the flip-side
wastes space. Note that it's simply a navigation bar—a holder for a button, and not a navigation controller.
Often, you'll replace the bar and the button with a single return button at the bottom of the screen, perhaps
with a custom graphic.
TIP
For Cocoa experts, the flip code triggered by the Done button uses a protocol method call to the superview. Re-
placing this with a simpler call to dismissModalView: animated: in the flip view works just as well. You can
use self as the modal view parameter. The call automatically finds the superview, so you don't need to specify it.
Using the View-based Application template
You can create either an iPad or an iPhone view-based application with this template, which is shown in Figure
3.17. This is the standard vanilla template used by most developers. It includes a window, a view controller, and
a view. The view controller is already subclassed, so you can start adding code to it immediately. The view isn't
subclassed, so you can't add code to it. But typically you only need to subclass it if you plan to add custom
drawing code for animations or unusual graphics. Otherwise, use the view controller to manage user interac-
tions and to control updates. Add items to the view controller nib to lay out your interface.
Note that this template produces iPad or iPhone applications. If you want to create a universal iPhone and iPad
application, use the Window-based template.
Search WWH ::




Custom Search