Skip to Main Content
Beginning iOS 4 Application Development
book

Beginning iOS 4 Application Development

by Wei-Meng Lee
October 2010
Beginner content levelBeginner
655 pages
14h 9m
English
Wrox
Content preview from Beginning iOS 4 Application Development

Chapter 4. View Controllers

WHAT YOU WILL LEARN IN THIS CHAPTER

  • Understanding the structure of a View-based Application project

  • How to create a Window-based 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 during runtime

  • How to animate the switching of views

  • How to create a Split View-based application

  • How to create a Tab Bar application

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

In real-life applications, you often need more than one View Controller, with each controlling a different view 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 views in your application and then programmatically switch among them during runtime. In addition, you learn how to animate the switching of views using the built-in animation methods available in the iPhone SDK.

The View-Based Application Template

When you ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning iOS 5 Application Development

Beginning iOS 5 Application Development

Wei-Meng Lee

Publisher Resources

ISBN: 9780470918029Purchase book