4

Exploring the Different View Controllers

WHAT YOU WILL LEARN IN THIS CHAPTER

  • Understanding the structure of a Single View Application project
  • How to create an Empty Application project and manually add a View controller and a View window to it
  • Creating views dynamically during runtime
  • Wiring up events of views with event handlers via code
  • How to switch to another View window during runtime
  • How to animate the switching of views
  • How to create a Master-Detail application
  • How to create a Tabbed application

So far you've dealt only with single-view applications — that is, applications with a single View controller for controlling the View window. The previous chapters all use the Single View Application template available in the iOS SDK because it is the simplest way to get started with iOS programming. When you create a Single View Application project, there is one View controller (named <Class_Prefix>ViewController by the iOS SDK) by default.

In real-life applications, you often need more than one View controller, with each controlling a different View windows displaying different information. This chapter explains the various types of projects you can create for your iPhone and iPad and how each utilizes a different type of View controller. You will also learn how to create multiple View windows in your application and then programmatically switch among them during runtime. In addition, you learn how to animate the switching of View windows using the built-in animation methods ...

Get Beginning iOS 5 Application Development 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.