Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Bridging the Model and View: The Controller

Your model needs to be able to communicate with the view so it can understand what data is in the view’s text fields. Your view needs to connect with the model so it can receive updates when calculations are performed in which the results must be shown to the user. The controller consists of one or more classes whose sole purpose is to communicate between the model and the view.

In this chapter, you will learn about the paths used for communication between the objects and learn how to use Interface Builder to define those paths. You learn how to define what the controller does and how it can send messages using the paths you created between the model and the view.

Contents:

Paths for Object Communication: Outlets, Targets, and Actions
Defining the Controller Class
Defining the Outlets for the ConverterController Class
Implementing the Controller Method: convert:
Interconnecting the Controller with the View
Connecting the Controller with the Model
Garbage Collection
What’s Next?




< Previous PageNext Page > Hide TOC


Last updated: 2007-10-31




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice