Home > 2010 Winter DPS913 > DPS913 lecture notes Fri Feb 5

DPS913 lecture notes Fri Feb 5

February 5, 2010 Leave a comment Go to comments

Today, we introduce you to special-purpose controllers – tab bar and navigation – that enable you to manage a number of view + view controllers.

.

Prepare for today’s class

Show up on time. Be alert and mentally agile. Be prepared to learn.

If you wish, you can look at some of the introductory readings in the DPS913 Virtual Textbook.

And, you can go through the digital content linked below.

.

Coming up in DPS913 / APD601

Wed Feb 10 – navigation-based apps that use table views

Fri Feb 12 – important – lecture topics continued

.

Working with multiple view controllers

As a new iPhone OS programmer, you have learned that the view controller is the foundational building block in an iPhone OS app. It provides the app logic, and manages a view that shows a screenful of content. In the last lecture, you were introduced to modal view controllers, and as a result, worked with more than one view controller in an app.

Today, we learn how to work with larger numbers of view controllers. The iPhone OS has two special-purpose controllers that help manage a number of view controllers: Tab Bar Controller, and Navigation Controller.

Both controllers manage an array of view controllers. If you use one of these controllers, it is defined and configured in MainWindow.xib. Then, we declare an outlet for it in the app delegate.

.

Tab Bar Controller

A tab bar controller manages an array of view controllers. Each element of the array – a view controller – is known and defined at design time. The app’s user has the ability to select and work with any view (with its backing view controller) at any time; there is no predefined usage sequence.

A typical tab bar app style is suitable for presenting different modes of, or tasks for, the app.

Read the dedicated blog post for more details.

.

Navigation Controller

A navigation controller manages an array of view controllers, but as a “stack” data structure (last in, first out). The “root” element of the array – a view controller – is known and defined at design time. The app enables a user to perform an action that causes another view + view controller to become active. The new view controller is added to the navigation controller array by adhering to stack principles: It gets “pushed” onto the stack, and when the user has finished working with the view, the user taps a “back” button on the left side of the navigation bar at the top of the screen, which causes the view controller to be “popped” off the stack.

A typical navigation-based app style enables a data and/or task hierarchy to be presented. Often, you will see this implemented as “drilling down” into deeper levels of data and/or task presentation.

Read the dedicated blog post for more details.

.

Blog posts for today’s class

Introduction to the tab bar app style

Modify an existing app to work in a tab bar app style

Introduction to the navigation-based app style

Check the example apps download page

.


Advertisements
Categories: 2010 Winter DPS913
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: