Preface |
|
xi | |
|
1 Cocoa Development Tools |
|
|
1 | (20) |
|
The Mac and iOS Developer Programs |
|
|
1 | (1) |
|
Registering for a Developer Program |
|
|
2 | (1) |
|
Downloading Xcode from Apple Developer |
|
|
3 | (1) |
|
|
3 | (4) |
|
|
7 | (7) |
|
Developing a Simple Objective-C Application |
|
|
14 | (1) |
|
|
15 | (1) |
|
|
16 | (2) |
|
|
18 | (3) |
|
2 Object-Oriented Programming with Objective-C |
|
|
21 | (16) |
|
Object-Oriented Programming |
|
|
21 | (1) |
|
|
22 | (1) |
|
|
23 | (1) |
|
Interfaces and Implementations |
|
|
23 | (1) |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
26 | (3) |
|
|
29 | (1) |
|
|
30 | (1) |
|
|
31 | (1) |
|
|
32 | (1) |
|
Automatic Reference Counting |
|
|
32 | (1) |
|
Object Graphs in Objective-C |
|
|
32 | (1) |
|
|
33 | (1) |
|
Allocation and Initialization |
|
|
33 | (1) |
|
|
34 | (1) |
|
Finalization and Deallocation |
|
|
34 | (3) |
|
|
37 | (22) |
|
Mutable and Immutable Objects |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
39 | (1) |
|
|
39 | (3) |
|
|
42 | (1) |
|
|
43 | (1) |
|
|
43 | (3) |
|
|
46 | (1) |
|
|
46 | (1) |
|
|
47 | (2) |
|
|
49 | (1) |
|
|
50 | (1) |
|
Loading Data from Files and URLs |
|
|
50 | (2) |
|
Serialization and Deserialization |
|
|
52 | (2) |
|
|
54 | (1) |
|
|
55 | (1) |
|
|
56 | (1) |
|
|
57 | (2) |
|
4 Applications on OS X and iOS |
|
|
59 | (14) |
|
|
59 | (1) |
|
Applications, Frameworks, Utilities, and More |
|
|
60 | (1) |
|
What Are Apps Composed Of? |
|
|
61 | (2) |
|
Using NSBundle to Find Resources in Applications |
|
|
63 | (1) |
|
The Application Lifecycle |
|
|
64 | (1) |
|
|
64 | (2) |
|
|
66 | (3) |
|
|
69 | (1) |
|
|
70 | (3) |
|
5 Graphical User Interfaces |
|
|
73 | (16) |
|
Interfaces in OS X and iOS |
|
|
73 | (1) |
|
MVC and Application Design |
|
|
74 | (1) |
|
|
74 | (1) |
|
|
75 | (4) |
|
|
79 | (1) |
|
|
80 | (1) |
|
Constructing an Interface |
|
|
80 | (1) |
|
Guidelines and Constraints |
|
|
80 | (2) |
|
Building an App with Nibs and Constraints |
|
|
82 | (2) |
|
|
84 | (1) |
|
|
85 | (1) |
|
|
85 | (4) |
|
6 Blocks and Operation Quotes |
|
|
89 | (14) |
|
|
89 | (1) |
|
|
90 | (2) |
|
|
92 | (1) |
|
Methods with Block Parameters |
|
|
93 | (1) |
|
Blocks and Memory Management |
|
|
94 | (1) |
|
Modifying Local Variables from Inside Blocks with _block |
|
|
95 | (1) |
|
Concurrency with Operation Queues |
|
|
95 | (1) |
|
Operation Queues and NSOperation |
|
|
96 | (1) |
|
Performing Work on Operation Queues |
|
|
97 | (1) |
|
|
98 | (5) |
|
7 Drawing Graphics in Views |
|
|
103 | (26) |
|
|
103 | (2) |
|
|
105 | (1) |
|
|
105 | (2) |
|
|
107 | (1) |
|
|
108 | (1) |
|
|
108 | (1) |
|
|
109 | (1) |
|
|
110 | (1) |
|
|
110 | (1) |
|
Filling with a Solid Color |
|
|
110 | (3) |
|
|
113 | (1) |
|
|
114 | (3) |
|
|
117 | (1) |
|
|
118 | (4) |
|
|
122 | (4) |
|
|
126 | (3) |
|
|
129 | (16) |
|
|
129 | (1) |
|
Playing Video with AVPlayer |
|
|
130 | (1) |
|
|
131 | (1) |
|
|
131 | (4) |
|
Playing Sound with AVAudioPlayer |
|
|
135 | (2) |
|
Working with the Photo Library |
|
|
137 | (1) |
|
Capturing Photos and Video from the Camera |
|
|
138 | (2) |
|
Building a Photo Application |
|
|
140 | (2) |
|
|
142 | (3) |
|
9 Model Objects and Data Storage |
|
|
145 | (18) |
|
|
146 | (2) |
|
|
148 | (1) |
|
Registering for Change Notifications |
|
|
148 | (2) |
|
Notifying Observers of Changes |
|
|
150 | (1) |
|
Notifications with NSNotification |
|
|
150 | (1) |
|
|
151 | (1) |
|
Registering Default Preferences |
|
|
152 | (1) |
|
|
153 | (1) |
|
|
154 | (1) |
|
Working with the Filesystem |
|
|
154 | (2) |
|
|
156 | (3) |
|
|
159 | (1) |
|
|
159 | (1) |
|
|
159 | (1) |
|
|
160 | (1) |
|
Security-Scoped Bookmarks |
|
|
160 | (3) |
|
|
163 | (12) |
|
|
164 | (1) |
|
|
164 | (3) |
|
|
167 | (1) |
|
Array and Object Controllers |
|
|
168 | (1) |
|
A More Complex Bindings App |
|
|
169 | (6) |
|
11 Table Views and Collection Views |
|
|
175 | (20) |
|
Data Sources and Delegates |
|
|
175 | (1) |
|
|
176 | (1) |
|
|
176 | (1) |
|
|
177 | (1) |
|
|
178 | (1) |
|
|
178 | (4) |
|
Implementing a Table View |
|
|
182 | (2) |
|
|
184 | (4) |
|
|
188 | (1) |
|
NSTableView with Bindings |
|
|
189 | (1) |
|
|
190 | (1) |
|
|
190 | (5) |
|
12 Document-Based Applications |
|
|
195 | (20) |
|
The NSDocument and UIDocument Classes |
|
|
196 | (1) |
|
|
196 | (1) |
|
|
196 | (1) |
|
|
197 | (1) |
|
Document-Based Applications on OS X |
|
|
198 | (1) |
|
|
198 | (1) |
|
Representing Documents with NSDocument |
|
|
199 | (1) |
|
|
200 | (2) |
|
|
202 | (4) |
|
Document-Based Applications on iOS |
|
|
206 | (1) |
|
Representing Documents with UIDocument |
|
|
206 | (9) |
|
|
215 | (8) |
|
|
215 | (1) |
|
|
216 | (1) |
|
|
217 | (1) |
|
|
218 | (1) |
|
NSURLResponse and NSHTTPURLResponse |
|
|
218 | (1) |
|
Building a Networked Application |
|
|
218 | (2) |
|
Discovering Nearby Services |
|
|
220 | (1) |
|
Browsing for Shared iTunes Libraries |
|
|
220 | (3) |
|
14 Working with the Real World |
|
|
223 | (20) |
|
|
223 | (1) |
|
|
224 | (1) |
|
The Core Location Framework |
|
|
225 | (1) |
|
Working with Core Location |
|
|
226 | (4) |
|
|
230 | (2) |
|
|
232 | (1) |
|
|
233 | (1) |
|
|
234 | (5) |
|
|
239 | (1) |
|
|
239 | (1) |
|
|
240 | (3) |
|
|
243 | (12) |
|
|
243 | (1) |
|
Accessing the Event Store |
|
|
244 | (1) |
|
|
245 | (1) |
|
|
245 | (1) |
|
|
246 | (1) |
|
Building an Events Application |
|
|
247 | (5) |
|
|
252 | (3) |
|
16 Instruments and the Debugger |
|
|
255 | (20) |
|
Getting Started with Instruments |
|
|
256 | (1) |
|
The Instruments Interface |
|
|
256 | (3) |
|
|
259 | (1) |
|
Adding Instruments from the Library |
|
|
260 | (1) |
|
Fixing Problems with Instruments |
|
|
260 | (6) |
|
|
266 | (3) |
|
|
269 | (1) |
|
|
269 | (4) |
|
Inspecting Memory Contents |
|
|
273 | (1) |
|
Working with the Debugger Console |
|
|
273 | (2) |
|
17 Sharing and Notifications |
|
|
275 | (14) |
|
|
275 | (2) |
|
|
277 | (3) |
|
|
280 | (1) |
|
|
281 | (1) |
|
|
281 | (1) |
|
Sending Push Notifications |
|
|
282 | (2) |
|
Setting Up to Receive Push Notifications |
|
|
284 | (2) |
|
Receiving Push Notifications |
|
|
286 | (1) |
|
|
287 | (2) |
|
|
289 | (10) |
|
|
289 | (2) |
|
|
291 | (1) |
|
How Preference Panes Work |
|
|
291 | (1) |
|
|
292 | (1) |
|
Building a Sample Preference Pane |
|
|
293 | (2) |
|
|
295 | (1) |
|
Building a Status Bar App |
|
|
295 | (4) |
|
|
299 | (10) |
|
Internationalization and Localization |
|
|
299 | (1) |
|
|
299 | (1) |
|
Creating a Sample Localized Application |
|
|
300 | (2) |
|
Formatting Data with NSFormatter |
|
|
302 | (1) |
|
Formatting Dates with NSDateFormatter |
|
|
302 | (2) |
|
Detecting Data with NSDataDetector |
|
|
304 | (1) |
|
|
305 | (4) |
|
|
309 | (16) |
|
|
309 | (1) |
|
|
310 | (2) |
|
Testing Whether iCloud Works |
|
|
312 | (1) |
|
|
312 | (5) |
|
|
317 | (8) |
Index |
|
325 | |