background image
Figures and Listings
Chapter 1
The Essence of Cocoa 11
Figure 1-1
An object 12
Figure 1-2
Object relationships in the Model-View-Controller paradigm 12
Chapter 2
Creating a Project in Xcode 15
Figure 2-1
The Xcode application icon 15
Figure 2-2
The New Project Assistant in Xcode 16
Figure 2-3
Entering the project's name and location 17
Figure 2-4
The new Currency Converter project in Xcode 18
Chapter 3
Defining the Model 21
Listing 3-1
Declaration of the member variables in
Converter.h
22
Listing 3-2
Definition of the
convertCurrency
method in
Converter.m
24
Chapter 4
Defining the View: Building the User Interface 25
Figure 4-1
Resizing a window manually 27
Figure 4-2
Resizing a window with the inspector 28
Figure 4-3
Cocoa Views and Cells in the Interface Builder Library window 29
Figure 4-4
Resizing a text field 30
Figure 4-5
Right aligning a text label in Interface Builder 32
Figure 4-6
Text fields and labels in the Currency Converter window 32
Figure 4-7
Measuring distances in Interface Builder 34
Figure 4-8
Adding a horizontal line to the Currency Converter window 34
Figure 4-9
The Currency Converter application menu 35
Figure 4-10
The Currency Converter final user interface in Interface Builder 37
Figure 4-11
Connecting
nextKeyView
outlets in Interface Builder 38
Figure 4-12
Setting the
initialFirstResponder
outlet in Interface Builder 39
Chapter 5
Bridging the Model and View: The Controller 41
Figure 5-1
An outlet pointing from one object to another 41
Figure 5-2
Relationships in the target-action paradigm 43
Figure 5-3
A newly instantiated instance of
ConverterController
46
Figure 5-4
Outlets and actions in the Converter Controller Identity inspector 47
Figure 5-5
Connecting
ConverterController
to the
rateField
outlet 48
Figure 5-6
Checking the outlet connections 49
Listing 5-1
Definition of the
convert:
method in
ConverterController.m
50
7
2007-10-31 | © 2007 Apple Inc. All Rights Reserved.