Contents at a Glance |
|
iv | |
Contents |
|
v | |
About the Authors |
|
x | |
About the Technical Reviewer |
|
xi | |
Acknowledgments |
|
xii | |
Introduction |
|
xiii | |
|
Chapter 1 Becoming a Great iPhone/iPad or Mac Programmer |
|
|
1 | (12) |
|
Thinking Like a Developer |
|
|
1 | (3) |
|
Completing the Development Cycle |
|
|
4 | (2) |
|
Introducing Object Oriented Programming |
|
|
6 | (2) |
|
Working with the Alice Interface |
|
|
8 | (3) |
|
|
11 | (1) |
|
|
11 | (2) |
|
Chapter 2 Programming Basics |
|
|
13 | (24) |
|
|
13 | (7) |
|
|
14 | (1) |
|
|
15 | (2) |
|
Classes, Objects, and Instances in Alice |
|
|
17 | (1) |
|
|
18 | (1) |
|
|
18 | (1) |
|
|
19 | (1) |
|
|
19 | (1) |
|
Creating an Alice App---To the Moon Alice |
|
|
20 | (6) |
|
Your First Objective-C Program |
|
|
26 | (9) |
|
|
27 | (3) |
|
Launching and Using Xcode |
|
|
30 | (5) |
|
|
35 | (1) |
|
|
36 | (1) |
|
Chapter 3 It's All About the Data |
|
|
37 | (20) |
|
Numbering Systems Used in Programming |
|
|
37 | (5) |
|
|
37 | (2) |
|
|
39 | (2) |
|
|
41 | (1) |
|
|
42 | (1) |
|
|
42 | (1) |
|
Using Variable and Data Types with Alice |
|
|
43 | (7) |
|
Data Types and Objective-C |
|
|
50 | (4) |
|
|
54 | (2) |
|
|
56 | (1) |
|
|
56 | (1) |
|
Chapter 4 Making Decisions About...and Planning Program Flow |
|
|
57 | (24) |
|
|
57 | (5) |
|
|
59 | (2) |
|
|
61 | (1) |
|
|
62 | (2) |
|
|
62 | (2) |
|
|
64 | (8) |
|
|
67 | (1) |
|
Designing and Flowcharting an Example App |
|
|
68 | (1) |
|
|
69 | (1) |
|
Using Loops to Repeat Program Statements |
|
|
70 | (2) |
|
Coding the Example App in Alice |
|
|
72 | (2) |
|
Coding the Example App in Objective-C |
|
|
74 | (3) |
|
Nested If Statements and Else-If Statements |
|
|
77 | (1) |
|
Improving the Code Through Refactoring |
|
|
77 | (1) |
|
Moving Forward Without Alice |
|
|
78 | (1) |
|
|
79 | (1) |
|
|
80 | (1) |
|
Chapter 5 Object Oriented Programming with Objective-C |
|
|
81 | (16) |
|
|
81 | (1) |
|
|
82 | (1) |
|
|
83 | (10) |
|
|
93 | (1) |
|
|
94 | (1) |
|
|
94 | (1) |
|
|
95 | (1) |
|
|
95 | (1) |
|
|
95 | (1) |
|
|
95 | (1) |
|
|
95 | (1) |
|
|
96 | (1) |
|
|
96 | (1) |
|
Chapter 6 Introducing Objective-C and Xcode |
|
|
97 | (20) |
|
A Brief History of Objective-C |
|
|
97 | (1) |
|
Understanding C Language Basics |
|
|
98 | (2) |
|
Putting the "Objective" into Objective-C |
|
|
100 | (5) |
|
|
105 | (1) |
|
|
106 | (1) |
|
Creating Your First Project |
|
|
107 | (8) |
|
|
108 | (6) |
|
Building and Running the New Program |
|
|
114 | (1) |
|
|
115 | (1) |
|
|
116 | (1) |
|
Chapter 7 Objective-C Classes, Objects, and Methods |
|
|
117 | (20) |
|
Creating an Objective-C Class |
|
|
117 | (8) |
|
Declaring Interfaces and Instance Variables |
|
|
119 | (1) |
|
Sending Messages (Methods) |
|
|
119 | (2) |
|
Working with the Implementation File |
|
|
121 | (2) |
|
|
123 | (2) |
|
|
125 | (8) |
|
Overriding Default Behavior |
|
|
132 | (1) |
|
Taking Class Methods to the Next Level |
|
|
133 | (1) |
|
Accessing the Xcode Documentation |
|
|
133 | (1) |
|
|
134 | (1) |
|
|
135 | (2) |
|
Chapter 8 Programming Basics in Objective-C |
|
|
137 | (20) |
|
Creating a Simple Command Line Tool |
|
|
138 | (2) |
|
Introducing Instance Variables |
|
|
140 | (4) |
|
Accessing Instance Variables |
|
|
141 | (1) |
|
Using Getter and Setter Methods |
|
|
142 | (2) |
|
|
144 | (2) |
|
|
145 | (1) |
|
Understanding the Importance of Conventions |
|
|
146 | (1) |
|
Creating the MyBookstore Program |
|
|
146 | (10) |
|
Using the NSMutableDictionary Class |
|
|
148 | (1) |
|
Making Our Object Do Something |
|
|
149 | (1) |
|
|
150 | (3) |
|
|
153 | (1) |
|
Using the Bookstore and Book Objects |
|
|
154 | (2) |
|
|
156 | (1) |
|
|
156 | (1) |
|
|
157 | (18) |
|
Introducing Boolean Logic |
|
|
157 | (1) |
|
Using Relational Operators |
|
|
158 | (5) |
|
|
158 | (5) |
|
Using Boolean Expressions |
|
|
163 | (5) |
|
|
164 | (2) |
|
|
166 | (2) |
|
|
168 | (1) |
|
Using the Switch Statement |
|
|
168 | (2) |
|
Grouping Variables Together |
|
|
170 | (3) |
|
|
170 | (1) |
|
|
171 | (1) |
|
|
172 | (1) |
|
|
172 | (1) |
|
|
173 | (1) |
|
|
174 | (1) |
|
Chapter 10 Creating User Interfaces with Interface Builder |
|
|
175 | (24) |
|
Understanding Interface Builder |
|
|
176 | (1) |
|
The Model-View-Controller |
|
|
177 | (2) |
|
Human Interface Guidelines (HIGs) |
|
|
179 | (1) |
|
Creating an Example iPhone App with Interface Builder |
|
|
180 | (16) |
|
|
185 | (1) |
|
|
186 | (1) |
|
|
187 | (1) |
|
|
188 | (1) |
|
|
189 | (1) |
|
|
190 | (1) |
|
|
191 | (1) |
|
Connecting the Outlets and Objects |
|
|
192 | (1) |
|
Connecting Actions and Objects |
|
|
193 | (2) |
|
|
195 | (1) |
|
Broken Connections in Interface Builder |
|
|
196 | (2) |
|
|
198 | (1) |
|
|
198 | (1) |
|
Chapter 11 Memory, Addresses, and Pointers |
|
|
199 | (20) |
|
|
200 | (4) |
|
|
200 | (4) |
|
Understanding Memory Address Basics |
|
|
204 | (4) |
|
|
208 | (1) |
|
Working with Automatic Variables and Pointers |
|
|
208 | (1) |
|
|
209 | (3) |
|
|
210 | (2) |
|
Managing Memory in Objective-C |
|
|
212 | (4) |
|
Using the Retain/Release Model |
|
|
212 | (2) |
|
Working with Implied Retain Messages |
|
|
214 | (1) |
|
Sending the dealloc Message |
|
|
215 | (1) |
|
|
216 | (1) |
|
|
217 | (1) |
|
|
218 | (1) |
|
Chapter 12 Debugging Programs with Xcode |
|
|
219 | (18) |
|
Getting Started with Debugging |
|
|
220 | (4) |
|
|
220 | (2) |
|
|
222 | (1) |
|
Working with the Debugger Controls |
|
|
223 | (1) |
|
|
224 | (10) |
|
|
225 | (1) |
|
Looking at the Thread Window and Call Stack |
|
|
225 | (1) |
|
|
226 | (4) |
|
Deleting Multiple Breakpoints |
|
|
230 | (1) |
|
|
231 | (1) |
|
|
231 | (3) |
|
|
234 | (1) |
|
|
235 | (2) |
|
Chapter 13 Storing Information |
|
|
237 | (20) |
|
|
237 | (1) |
|
|
237 | (2) |
|
|
238 | (1) |
|
|
239 | (1) |
|
|
239 | (1) |
|
Storing Information in a Database |
|
|
240 | (1) |
|
Getting Started with Core Data |
|
|
241 | (1) |
|
|
242 | (8) |
|
|
250 | (1) |
|
|
250 | (5) |
|
|
255 | (1) |
|
|
255 | (2) |
|
Chapter 14 Protocols and Delegates |
|
|
257 | (6) |
|
|
257 | (1) |
|
|
258 | (1) |
|
|
259 | (1) |
|
|
259 | (1) |
|
|
260 | (1) |
|
|
261 | (2) |
Index |
|
263 | |