Introduction |
|
1 | (6) |
|
Who Should Read This Book |
|
|
1 | (1) |
|
|
1 | (1) |
|
Downloading the Example Files |
|
|
2 | (1) |
|
How This Book Is Organized |
|
|
2 | (5) |
|
Part I Getting Started with Objective-C |
|
|
|
Hour 1 Overview of Objective-C |
|
|
7 | (16) |
|
|
7 | (1) |
|
Enrolling as an Apple Developer |
|
|
8 | (3) |
|
Setting Up the Development Environment |
|
|
11 | (8) |
|
|
19 | (1) |
|
|
20 | (1) |
|
|
20 | (3) |
|
Hour 2 Object-Oriented Programming with Objective-C |
|
|
23 | (12) |
|
Object-Oriented Programming in the Objective-C World |
|
|
23 | (3) |
|
|
26 | (4) |
|
Managing Inheritance in the Objective-C World |
|
|
30 | (2) |
|
|
32 | (1) |
|
|
32 | (1) |
|
|
33 | (2) |
|
Hour 3 Using Object-Oriented Features in Objective-C |
|
|
35 | (8) |
|
Communicating to Methods with Messages |
|
|
35 | (4) |
|
Allocating and Initializing Objects |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
41 | (1) |
|
|
41 | (2) |
|
Hour 4 Organizing Projects with a Git Source Code Repository |
|
|
43 | (26) |
|
Getting to Work with Xcode |
|
|
43 | (4) |
|
Keeping Track of Your Source Code |
|
|
47 | (15) |
|
Using a Remote Repository |
|
|
62 | (4) |
|
|
66 | (1) |
|
|
66 | (1) |
|
|
66 | (3) |
|
Hour 5 Using Compiler Directives |
|
|
69 | (12) |
|
|
69 | (2) |
|
Working with Compiler Directives |
|
|
71 | (6) |
|
Using Objective-C Compiler Directives |
|
|
77 | (1) |
|
|
78 | (1) |
|
|
78 | (1) |
|
|
78 | (3) |
|
Part II Working with the Objective-C Basics |
|
|
|
Hour 6 Exploring Messaging and a Testbed App |
|
|
81 | (16) |
|
|
81 | (4) |
|
Adding a Text Field and Connecting It to Your Code |
|
|
85 | (7) |
|
Sending a Message to the Text Field |
|
|
92 | (2) |
|
Reviewing the Message Syntax |
|
|
94 | (1) |
|
|
95 | (1) |
|
|
95 | (1) |
|
|
95 | (2) |
|
Hour 7 Declaring a Class in an Interface File |
|
|
97 | (14) |
|
Letting Xcode Do the Work |
|
|
97 | (6) |
|
Exploring Class Hierarchies |
|
|
103 | (3) |
|
|
106 | (2) |
|
|
108 | (1) |
|
|
108 | (1) |
|
|
108 | (3) |
|
Hour 8 Declaring Instance Variables in an Interface File |
|
|
111 | (14) |
|
Declaring Instance Variables and Properties |
|
|
111 | (1) |
|
|
111 | (3) |
|
Creating an Instance Variable for CurrencyConverter with id |
|
|
114 | (3) |
|
Creating an Instance Variable for CurrencyConverter with the Class Name |
|
|
117 | (2) |
|
Creating an Instance Variable for CurrencyConverter with a Superclass Name |
|
|
119 | (3) |
|
Managing Instance Variable Scope |
|
|
122 | (1) |
|
|
122 | (1) |
|
|
123 | (1) |
|
|
123 | (2) |
|
Hour 9 Declaring Properties in an Interface File |
|
|
125 | (14) |
|
Comparing Interface Variables and Properties |
|
|
125 | (5) |
|
Using Declared Properties |
|
|
130 | (2) |
|
|
132 | (3) |
|
Using Other Attribute Decorators |
|
|
135 | (1) |
|
|
135 | (1) |
|
|
136 | (1) |
|
|
137 | (1) |
|
|
137 | (2) |
|
Hour 10 Declaring Methods in an Interface File |
|
|
139 | (8) |
|
Working with Methods in a Class |
|
|
139 | (1) |
|
|
140 | (5) |
|
|
145 | (1) |
|
|
145 | (1) |
|
|
146 | (1) |
|
Hour 11 Declaring Actions in an Interface File |
|
|
147 | (16) |
|
|
147 | (11) |
|
Comparing Actions in Mac OS X and iOS |
|
|
158 | (3) |
|
|
161 | (1) |
|
|
161 | (2) |
|
Hour 12 Routing Messages with Selectors |
|
|
163 | (14) |
|
Getting Inside Objective-C Messages |
|
|
163 | (2) |
|
Getting Inside the Objective-C Runtime |
|
|
165 | (1) |
|
Working with SEL and @selector () |
|
|
166 | (1) |
|
|
167 | (3) |
|
|
170 | (4) |
|
Testing Whether an Instance Can Respond to a Selector |
|
|
174 | (1) |
|
|
174 | (1) |
|
|
175 | (1) |
|
|
175 | (2) |
|
Hour 13 Building on the Foundation |
|
|
177 | (10) |
|
Exploring the Foundation Framework |
|
|
177 | (1) |
|
|
178 | (2) |
|
Foundation Paradigms and Policies |
|
|
180 | (5) |
|
|
185 | (1) |
|
|
185 | (1) |
|
|
185 | (2) |
|
Hour 14 Defining a Class in an Implementation File |
|
|
187 | (14) |
|
Working with a New Project |
|
|
187 | (4) |
|
|
191 | (3) |
|
|
194 | (3) |
|
Expanding the Class with init Methods |
|
|
197 | (2) |
|
|
199 | (1) |
|
|
200 | (1) |
|
|
200 | (1) |
|
Hour 15 Organizing Data with Collections |
|
|
201 | (14) |
|
|
201 | (2) |
|
Getting Familiar with Property Lists |
|
|
203 | (2) |
|
Comparing the Collection Classes |
|
|
205 | (1) |
|
|
206 | (4) |
|
|
210 | (2) |
|
Testing Membership in a Collection |
|
|
212 | (1) |
|
Accessing an Object in a Collection |
|
|
213 | (1) |
|
|
213 | (1) |
|
|
213 | (1) |
|
|
214 | (1) |
|
Hour 16 Managing Memory and Runtime Objects |
|
|
215 | (12) |
|
Managing Objects in Memory |
|
|
215 | (2) |
|
Managing Reference Counts Manually |
|
|
217 | (3) |
|
Managing Reference Counts with ARC |
|
|
220 | (2) |
|
|
222 | (1) |
|
|
223 | (1) |
|
|
224 | (1) |
|
|
224 | (1) |
|
|
224 | (3) |
|
Part III Expanding and Extending Classes |
|
|
|
Hour 17 Extending a Class with Protocols and Delegates |
|
|
227 | (16) |
|
Exploring the Pros and Cons of Subclassing |
|
|
227 | (1) |
|
Exploring Multiple Detail Views Sample Code |
|
|
228 | (7) |
|
|
235 | (1) |
|
|
235 | (5) |
|
|
240 | (1) |
|
|
240 | (1) |
|
|
240 | (3) |
|
Hour 18 Extending a Class with Categories and Extensions |
|
|
243 | (10) |
|
Comparing Categories and Protocols |
|
|
243 | (1) |
|
Comparing Categories to Subclasses |
|
|
244 | (2) |
|
|
246 | (3) |
|
|
249 | (1) |
|
Working with Informal Protocols |
|
|
250 | (1) |
|
|
250 | (1) |
|
|
250 | (1) |
|
|
251 | (2) |
|
Hour 19 Using Associative References and Fast Enumeration |
|
|
253 | (10) |
|
Catching Up on Objective-C 2.0 Time-Saving Features |
|
|
253 | (1) |
|
Extending Classes by Adding Instance Variables (Sort of) |
|
|
254 | (4) |
|
|
258 | (3) |
|
|
261 | (1) |
|
|
261 | (1) |
|
|
261 | (2) |
|
Hour 20 Working with Blocks |
|
|
263 | (12) |
|
|
263 | (1) |
|
|
264 | (4) |
|
|
268 | (2) |
|
Exploring Blocks in Cocoa |
|
|
270 | (3) |
|
Looking Deeper into Cocoa Blocks and Memory |
|
|
273 | (1) |
|
|
273 | (1) |
|
|
274 | (1) |
|
|
274 | (1) |
|
Part IV Beyond the Basics |
|
|
|
Hour 21 Handling Exceptions |
|
|
275 | (10) |
|
Rethinking Exceptions and Errors |
|
|
275 | (1) |
|
Introducing the Exception and Error Classes |
|
|
276 | (5) |
|
|
281 | (1) |
|
|
282 | (1) |
|
|
283 | (1) |
|
|
283 | (1) |
|
|
284 | (1) |
|
|
284 | (1) |
|
Hour 22 Grand Central Dispatch: Using Queues and Threading |
|
|
285 | (10) |
|
Getting Started with Concurrency |
|
|
285 | (3) |
|
|
288 | (2) |
|
|
290 | (2) |
|
|
292 | (1) |
|
|
293 | (1) |
|
|
293 | (2) |
|
Hour 23 Working with the Debugger |
|
|
295 | (12) |
|
|
295 | (1) |
|
|
296 | (3) |
|
|
299 | (5) |
|
|
304 | (1) |
|
|
304 | (1) |
|
|
305 | (2) |
|
Hour 24 Using Instruments for Analysis |
|
|
307 | (12) |
|
Putting Instruments in Perspective |
|
|
307 | (2) |
|
|
309 | (2) |
|
Getting Started with Instruments |
|
|
311 | (3) |
|
Connecting to the iOS Simulator |
|
|
314 | (2) |
|
|
316 | (1) |
|
|
316 | (1) |
|
|
316 | (3) |
|
|
|
Appendix A C Syntax Summary |
|
|
319 | (4) |
|
|
319 | (2) |
|
|
321 | (2) |
|
Appendix B Apps, Packages, and Bundles |
|
|
323 | (6) |
|
Appendix C Archiving and Packaging Apps for Development and Testing |
|
|
329 | (4) |
|
Appendix D Introducing Xcode 4 |
|
|
333 | (42) |
|
|
333 | (1) |
|
|
334 | (2) |
|
Hello, App Development for Mac OS X and iOS |
|
|
336 | (2) |
|
Getting Started with Xcode |
|
|
338 | (3) |
|
|
341 | (10) |
|
|
351 | (4) |
|
|
355 | (2) |
|
Getting Help in an Editor Window |
|
|
357 | (1) |
|
Using Utilities---Inspectors |
|
|
357 | (3) |
|
Using Utilities---Libraries |
|
|
360 | (6) |
|
|
366 | (5) |
|
Using the Organizer Window |
|
|
371 | (4) |
Index |
|
375 | |