GBIS755 - UIKit Framework

Major Design Patterns:

Model-View-Controller (MVC)
Delegation
Block Object
Target-Action

Model-View-Controller (MVC)

Model objects= Content = data and logic (no user interface)

View objects = User Interface -- window, controls, know how to get input and display information

Controller objects = Connect the view objects to the model objects. Get data from the model and pass to view.

Think of View as the Client, the controller as the application, and the model as the database.

You create one and only one window. You can then add views to that window. The iPhone OS ca put additional windows on top of your window (system status bar).

Views (visually): content view sits on top of Window.

Views (program code): Views added to the content view become subviews of it, Views added to the content view become the superviews of any views added to them, a vies can have one and only one superview and zero or more subviews. A subview is displayed on top of its parent view.

View Controllers implement the controller component of MVC

You are pretty much on your own for the model objects.

View Controllers respond to controls in your view and may do things like tell the model to update its data


Delegation

customize the behavior of an object without subclassing it.

UIApplicaiton object handles most of the actual work neded to run the application. However, it sends your application delegate toe application:didFinishLaunchingWithOptions: message to give you the opportunity to restore the application's window and view to where it was whe the user previously left off.


Block Object

Pass units of code in as arguments of methods. These blocks of code are then used when they are needed to do some work. (View animations and transitions)


Target-Action

Let your application know that a user has done something. Control (button) sends a message (the action message) that you specify to the target you have slected to handle that particular action.