Chapter 6. Other View Controllers
Now that we’ve discussed the UITableView
and UINavigationController
(as well as their
associated classes and views) and built an iPhone application using them,
you’ve actually come a long way toward being able to write applications on
your own. With these classes under your belt, you have the tools to attack a
large slice of the problem space that iPhone applications normally
address.
In this chapter, we’ll look at some of the other view controllers and classes that will be useful when building your applications: simple two-screen views (utility applications), single-screen tabbed views (tab bar applications), a view controller that takes over the whole screen until dismissed (modal view controller), and a view controller for selecting video and images (image picker view controller).
Utility Applications
Utility applications perform simple tasks: they have a one-page main view and another window that is brought into view with a flip animation. The Stocks and Weather applications that ship with the iPhone and iPod touch are examples of applications that use this pattern. Both are optimized for simple tasks that require the absolute minimum of user interaction. Such applications are usually designed to display a simple list in the main view, with preferences and option settings on the flip view. You access the flip view by clicking a small i icon from the main view.
The Xcode Utility Application template implements the main view and gives the user access ...
Get Learning iPhone Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.