|
|
xvii | |
|
|
xxiii | |
Preface |
|
xxv | |
|
|
1 | (76) |
|
|
3 | (14) |
|
Understanding When to Use Cocoa |
|
|
3 | (6) |
|
|
3 | (2) |
|
|
5 | (1) |
|
|
5 | (2) |
|
|
7 | (1) |
|
|
8 | (1) |
|
Understanding Cocoa's Role in Mac OS X |
|
|
9 | (7) |
|
|
9 | (2) |
|
|
11 | (2) |
|
|
13 | (1) |
|
|
14 | (1) |
|
|
15 | (1) |
|
|
16 | (1) |
|
|
17 | (10) |
|
|
17 | (2) |
|
|
19 | (5) |
|
Objective-C Compiler Choices |
|
|
20 | (2) |
|
Differences from Java and C++ |
|
|
22 | (1) |
|
|
23 | (1) |
|
|
24 | (1) |
|
|
25 | (2) |
|
Using Apple's Developer Tools |
|
|
27 | (50) |
|
Obtaining Apple's Developer Tools |
|
|
28 | (1) |
|
|
28 | (9) |
|
|
30 | (1) |
|
|
31 | (3) |
|
Drawing a Simple Application |
|
|
34 | (3) |
|
|
37 | (6) |
|
Creating a Simple Project |
|
|
37 | (2) |
|
|
39 | (2) |
|
|
41 | (1) |
|
|
42 | (1) |
|
|
43 | (23) |
|
|
44 | (1) |
|
|
44 | (8) |
|
Exceptions and Synchronization |
|
|
52 | (3) |
|
|
55 | (3) |
|
|
58 | (2) |
|
|
60 | (3) |
|
|
63 | (3) |
|
|
66 | (1) |
|
|
66 | (8) |
|
|
66 | (4) |
|
|
70 | (2) |
|
Constructors and Initializers |
|
|
72 | (2) |
|
|
74 | (3) |
|
|
77 | (208) |
|
Foundation: The Objective-C Standard Library |
|
|
79 | (54) |
|
|
79 | (6) |
|
|
80 | (1) |
|
|
80 | (5) |
|
|
85 | (1) |
|
|
85 | (8) |
|
|
86 | (1) |
|
|
87 | (1) |
|
|
88 | (2) |
|
|
90 | (1) |
|
Caches and Discardable Data |
|
|
90 | (1) |
|
|
91 | (2) |
|
|
93 | (7) |
|
|
93 | (3) |
|
|
96 | (1) |
|
|
97 | (1) |
|
|
98 | (1) |
|
|
99 | (1) |
|
|
100 | (11) |
|
Enumerating with Higher-Order Messaging |
|
|
101 | (3) |
|
|
104 | (1) |
|
Supporting Fast Enumeration |
|
|
105 | (6) |
|
|
111 | (6) |
|
|
112 | (2) |
|
|
114 | (3) |
|
Interacting with the Filesystem |
|
|
117 | (7) |
|
|
117 | (3) |
|
Workspace and File Management |
|
|
120 | (2) |
|
|
122 | (1) |
|
|
123 | (1) |
|
|
124 | (8) |
|
|
125 | (1) |
|
|
126 | (1) |
|
Sending Asynchronous Notification |
|
|
127 | (3) |
|
Distributed Notifications |
|
|
130 | (2) |
|
|
132 | (1) |
|
|
133 | (26) |
|
|
133 | (7) |
|
Applications and Delegates |
|
|
140 | (2) |
|
|
142 | (5) |
|
|
142 | (4) |
|
|
146 | (1) |
|
|
147 | (1) |
|
Run Loops in Applications |
|
|
147 | (4) |
|
Delegates and Notifications |
|
|
151 | (3) |
|
|
154 | (3) |
|
|
154 | (1) |
|
|
155 | (1) |
|
|
156 | (1) |
|
|
157 | (2) |
|
Creating Graphical User Interfaces |
|
|
159 | (44) |
|
|
159 | (5) |
|
|
164 | (5) |
|
|
164 | (1) |
|
|
165 | (1) |
|
|
166 | (1) |
|
|
167 | (2) |
|
|
169 | (1) |
|
|
169 | (15) |
|
|
170 | (2) |
|
|
172 | (1) |
|
|
172 | (9) |
|
|
181 | (3) |
|
|
184 | (18) |
|
|
185 | (5) |
|
|
190 | (3) |
|
|
193 | (1) |
|
|
194 | (1) |
|
Bindings and User Defaults |
|
|
195 | (1) |
|
Using Bindings in Interface Builder |
|
|
196 | (6) |
|
|
202 | (1) |
|
|
203 | (42) |
|
|
204 | (4) |
|
|
207 | (1) |
|
|
208 | (1) |
|
|
208 | (11) |
|
|
210 | (2) |
|
|
212 | (2) |
|
Understanding Window Controllers |
|
|
214 | (1) |
|
Creating a Simple Window Factory |
|
|
214 | (4) |
|
Saving a Window's Position |
|
|
218 | (1) |
|
|
219 | (4) |
|
Displaying Standard Palettes |
|
|
220 | (3) |
|
|
223 | (6) |
|
|
223 | (1) |
|
|
224 | (5) |
|
|
229 | (3) |
|
|
232 | (11) |
|
|
232 | (2) |
|
Populating the Window Menu |
|
|
234 | (1) |
|
|
235 | (1) |
|
|
236 | (1) |
|
|
237 | (4) |
|
|
241 | (2) |
|
|
243 | (2) |
|
|
245 | (40) |
|
Constructing and Deconstructing Strings |
|
|
246 | (2) |
|
|
248 | (2) |
|
|
250 | (4) |
|
|
251 | (1) |
|
|
252 | (1) |
|
Localizing Format Strings |
|
|
253 | (1) |
|
|
254 | (1) |
|
|
255 | (6) |
|
|
257 | (4) |
|
|
261 | (1) |
|
|
261 | (14) |
|
|
261 | (3) |
|
|
264 | (4) |
|
|
268 | (1) |
|
|
269 | (1) |
|
|
270 | (5) |
|
Writing a Custom Text Container |
|
|
275 | (4) |
|
Using Multiple Text Views |
|
|
279 | (4) |
|
|
283 | (2) |
|
|
285 | (66) |
|
Creating Document-Driven Applications |
|
|
287 | (42) |
|
|
288 | (5) |
|
|
289 | (3) |
|
|
292 | (1) |
|
Creating the Application Skeleton |
|
|
293 | (2) |
|
|
295 | (6) |
|
|
295 | (2) |
|
Building the Document Model |
|
|
297 | (1) |
|
Loading and Saving Documents |
|
|
297 | (4) |
|
|
301 | (1) |
|
|
301 | (11) |
|
Defining a Native File Format |
|
|
302 | (2) |
|
Defining a Foreign File Format |
|
|
304 | (3) |
|
Supporting Loading and Saving |
|
|
307 | (5) |
|
|
312 | (6) |
|
Registering Undo Operations |
|
|
314 | (2) |
|
|
316 | (1) |
|
Performing Undo Operations |
|
|
316 | (1) |
|
|
317 | (1) |
|
Adding Undo to the Outliner |
|
|
318 | (10) |
|
|
328 | (1) |
|
|
329 | (22) |
|
Introducing Data Modeling |
|
|
330 | (1) |
|
Understanding Managed Objects |
|
|
331 | (1) |
|
|
332 | (2) |
|
|
334 | (9) |
|
Choosing a Persistent Store |
|
|
343 | (2) |
|
|
343 | (1) |
|
|
343 | (1) |
|
|
344 | (1) |
|
|
344 | (1) |
|
|
345 | (1) |
|
|
345 | (2) |
|
|
347 | (1) |
|
Core Data, Spotlight, and Time Machine |
|
|
348 | (1) |
|
|
349 | (2) |
|
IV Complex User Interfaces |
|
|
351 | (80) |
|
Working with Structured Data |
|
|
353 | (42) |
|
Data Sources and Delegates |
|
|
354 | (1) |
|
|
354 | (8) |
|
|
355 | (1) |
|
|
356 | (2) |
|
|
358 | (4) |
|
|
362 | (14) |
|
|
363 | (13) |
|
|
376 | (4) |
|
|
376 | (1) |
|
|
377 | (3) |
|
|
380 | (4) |
|
Displaying Files in a Collection View |
|
|
381 | (3) |
|
Customizing Views with New Cells |
|
|
384 | (3) |
|
Creating Master-Detail Views |
|
|
387 | (6) |
|
Inspectors as Detail Views |
|
|
389 | (4) |
|
|
393 | (2) |
|
|
395 | (36) |
|
|
395 | (1) |
|
Inspecting the View Hierarchy |
|
|
396 | (2) |
|
Modifying the View Hierarchy |
|
|
398 | (14) |
|
|
399 | (4) |
|
|
403 | (4) |
|
|
407 | (5) |
|
Creating Dynamic Input Forms |
|
|
412 | (14) |
|
Creating a Form with a Matrix |
|
|
413 | (5) |
|
Creating a Form with a Custom View |
|
|
418 | (4) |
|
Creating a Form with a Rule Editor |
|
|
422 | (4) |
|
|
426 | (3) |
|
|
429 | (2) |
|
|
431 | (158) |
|
|
433 | (60) |
|
|
434 | (1) |
|
|
435 | (3) |
|
|
438 | (32) |
|
|
439 | (4) |
|
|
443 | (10) |
|
|
453 | (4) |
|
|
457 | (6) |
|
|
463 | (5) |
|
|
468 | (2) |
|
Printing and Paginating Views |
|
|
470 | (12) |
|
|
471 | (1) |
|
Creating Print Operations |
|
|
472 | (3) |
|
|
475 | (6) |
|
|
481 | (1) |
|
Extending Interface Builder with Palettes |
|
|
482 | (9) |
|
|
491 | (2) |
|
|
493 | (28) |
|
|
493 | (1) |
|
|
494 | (4) |
|
Understanding Cocoa Movie Objects |
|
|
498 | (4) |
|
|
502 | (4) |
|
|
506 | (1) |
|
|
507 | (1) |
|
Sound and Video Recording |
|
|
508 | (4) |
|
|
512 | (1) |
|
|
513 | (1) |
|
|
514 | (5) |
|
|
519 | (2) |
|
|
521 | (34) |
|
|
521 | (2) |
|
|
523 | (5) |
|
|
524 | (4) |
|
Setting a Layer's Content |
|
|
528 | (1) |
|
Understanding Animation Concepts |
|
|
528 | (3) |
|
|
531 | (2) |
|
|
533 | (7) |
|
|
540 | (3) |
|
Creating Complex Animations |
|
|
543 | (1) |
|
3D Core Animation Transforms |
|
|
544 | (5) |
|
|
549 | (3) |
|
|
552 | (1) |
|
|
553 | (2) |
|
|
555 | (34) |
|
|
556 | (1) |
|
|
557 | (8) |
|
|
559 | (2) |
|
|
561 | (1) |
|
|
562 | (3) |
|
Dynamic Interfaces with WebKit |
|
|
565 | (7) |
|
|
572 | (2) |
|
|
574 | (14) |
|
Understanding PDF Annotations |
|
|
578 | (3) |
|
Setting Document Metadata |
|
|
581 | (2) |
|
|
583 | (5) |
|
|
588 | (1) |
|
VI User Interface Integration |
|
|
589 | (162) |
|
|
591 | (46) |
|
Maintaining Document Indexes |
|
|
592 | (5) |
|
|
592 | (2) |
|
|
594 | (1) |
|
|
595 | (2) |
|
|
597 | (2) |
|
|
599 | (11) |
|
|
610 | (13) |
|
Monitoring Filesystem Events |
|
|
611 | (1) |
|
|
611 | (2) |
|
Building a Metadata Import Plugin |
|
|
613 | (6) |
|
|
619 | (3) |
|
|
622 | (1) |
|
|
623 | (9) |
|
|
623 | (2) |
|
Creating Predicates Directly |
|
|
625 | (2) |
|
|
627 | (1) |
|
Displaying a Predicate Editor |
|
|
628 | (4) |
|
|
632 | (4) |
|
|
633 | (1) |
|
Implementing Quick Look Plugins |
|
|
634 | (2) |
|
|
636 | (1) |
|
Contacts, Calendars, and Secrets |
|
|
637 | (38) |
|
|
637 | (5) |
|
|
638 | (1) |
|
|
639 | (3) |
|
Getting Information About People |
|
|
642 | (1) |
|
Searching the Address Book |
|
|
643 | (2) |
|
Populating the ``Me'' vCard |
|
|
645 | (3) |
|
Adding People to the Address Book |
|
|
648 | (1) |
|
|
649 | (10) |
|
|
659 | (7) |
|
|
659 | (2) |
|
|
661 | (4) |
|
|
665 | (1) |
|
|
666 | (7) |
|
|
667 | (6) |
|
|
673 | (2) |
|
|
675 | (32) |
|
|
675 | (2) |
|
|
677 | (3) |
|
|
680 | (1) |
|
|
681 | (1) |
|
|
682 | (1) |
|
|
683 | (1) |
|
|
684 | (2) |
|
|
686 | (11) |
|
|
687 | (2) |
|
|
689 | (1) |
|
Implementing Drag and Drop in a Custom View |
|
|
690 | (7) |
|
Drag and Drop with Data Views |
|
|
697 | (8) |
|
|
705 | (2) |
|
|
707 | (14) |
|
|
707 | (2) |
|
|
709 | (5) |
|
|
714 | (3) |
|
Controlling the Services Menu |
|
|
717 | (1) |
|
|
718 | (1) |
|
|
719 | (2) |
|
|
721 | (30) |
|
|
721 | (4) |
|
The AppleScript Object Model |
|
|
723 | (1) |
|
|
723 | (2) |
|
Making Objects Scriptable |
|
|
725 | (15) |
|
Understanding AppleScript Objects |
|
|
725 | (1) |
|
Providing Object Specifiers |
|
|
726 | (2) |
|
Providing a Scripting Definition |
|
|
728 | (5) |
|
Handling Scripting Commands |
|
|
733 | (4) |
|
Testing Scripting Support |
|
|
737 | (3) |
|
|
740 | (7) |
|
Exposing Services to Automator |
|
|
747 | (1) |
|
Other Scripting Technologies |
|
|
748 | (2) |
|
|
748 | (1) |
|
|
749 | (1) |
|
|
750 | (1) |
|
|
751 | (72) |
|
|
753 | (34) |
|
Low-Level Socket Programming |
|
|
753 | (6) |
|
|
759 | (1) |
|
|
760 | (8) |
|
|
761 | (1) |
|
|
762 | (2) |
|
Extending the URL Loading System |
|
|
764 | (4) |
|
|
768 | (5) |
|
|
768 | (1) |
|
|
768 | (1) |
|
|
769 | (3) |
|
|
772 | (1) |
|
|
773 | (12) |
|
|
774 | (2) |
|
|
776 | (1) |
|
|
777 | (8) |
|
|
785 | (2) |
|
|
787 | (36) |
|
|
788 | (1) |
|
|
789 | (18) |
|
|
790 | (1) |
|
|
790 | (1) |
|
|
791 | (8) |
|
|
799 | (4) |
|
|
803 | (3) |
|
|
806 | (1) |
|
|
807 | (6) |
|
|
807 | (1) |
|
Communicating with Children |
|
|
807 | (2) |
|
|
809 | (4) |
|
|
813 | (6) |
|
|
819 | (2) |
|
|
821 | (1) |
|
|
822 | (1) |
|
|
823 | (62) |
|
|
825 | (12) |
|
|
825 | (1) |
|
Mobile OS X on the iPhone |
|
|
826 | (1) |
|
|
826 | (1) |
|
|
827 | (6) |
|
|
829 | (1) |
|
|
830 | (2) |
|
|
832 | (1) |
|
|
833 | (1) |
|
|
834 | (1) |
|
|
834 | (3) |
|
|
837 | (48) |
|
|
838 | (5) |
|
|
838 | (1) |
|
|
838 | (2) |
|
|
840 | (1) |
|
|
841 | (1) |
|
|
842 | (1) |
|
|
843 | (8) |
|
|
843 | (1) |
|
|
844 | (2) |
|
|
846 | (3) |
|
|
849 | (2) |
|
|
851 | (4) |
|
|
851 | (2) |
|
|
853 | (2) |
|
|
855 | (14) |
|
|
855 | (2) |
|
Subverting Dynamic Dispatch |
|
|
857 | (2) |
|
|
859 | (5) |
|
|
864 | (1) |
|
|
865 | (2) |
|
|
867 | (2) |
|
|
869 | (3) |
|
|
872 | (13) |
|
Understanding Object Implementation |
|
|
873 | (3) |
|
Enumerating All Subclasses |
|
|
876 | (3) |
|
Adding Methods to a Class |
|
|
879 | (6) |
Index |
|
885 | |