Preface |
|
xi | |
1 Cocoa Development Tools |
|
1 | (20) |
|
The Mac and iOS Developer Programs |
|
|
1 | (2) |
|
Registering for a Developer Program |
|
|
2 | (1) |
|
Downloading Xcode from Apple Developer |
|
|
3 | (1) |
|
|
3 | (11) |
|
Creating Your First Cocoa Project |
|
|
5 | (2) |
|
|
7 | (7) |
|
Developing a Simple Objective-C Application |
|
|
14 | (3) |
|
|
14 | (1) |
|
|
15 | (2) |
|
|
17 | (4) |
2 Object-Oriented Programming with Objective-C |
|
21 | (16) |
|
Object-Oriented Programming |
|
|
21 | (12) |
|
|
22 | (1) |
|
|
23 | (1) |
|
Interfaces and Implementations |
|
|
23 | (1) |
|
|
24 | (1) |
|
|
25 | (1) |
|
|
26 | (3) |
|
|
29 | (1) |
|
|
30 | (1) |
|
|
31 | (2) |
|
|
33 | (2) |
|
|
33 | (1) |
|
Automatic Reference Counting |
|
|
33 | (1) |
|
Object Graphs in Objective-C |
|
|
34 | (1) |
|
|
35 | (2) |
|
Allocation and Initialization |
|
|
35 | (1) |
|
|
36 | (1) |
|
Finalization and Deallocation |
|
|
36 | (1) |
3 Foundation |
|
37 | (22) |
|
Mutable and Immutable Objects |
|
|
37 | (1) |
|
|
38 | (5) |
|
|
39 | (1) |
|
|
39 | (3) |
|
|
42 | (1) |
|
|
43 | (1) |
|
|
43 | (5) |
|
|
46 | (1) |
|
|
46 | (2) |
|
|
48 | (1) |
|
|
49 | (1) |
|
|
50 | (4) |
|
Loading Data from Files and URLs |
|
|
50 | (1) |
|
Serialization and Deserialization |
|
|
51 | (3) |
|
|
54 | (5) |
|
|
54 | (2) |
|
|
56 | (1) |
|
|
56 | (3) |
4 Applications on OS X and iOS |
|
59 | (16) |
|
|
59 | (5) |
|
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 | (7) |
|
|
64 | (2) |
|
|
66 | (5) |
|
|
71 | (4) |
|
|
71 | (4) |
5 Graphical User Interfaces |
|
75 | (20) |
|
Interfaces in OS X and iOS |
|
|
75 | (1) |
|
MVC and Application Design |
|
|
76 | (1) |
|
|
76 | (7) |
|
|
77 | (4) |
|
|
81 | (1) |
|
|
81 | (1) |
|
|
82 | (1) |
|
Constructing an Interface |
|
|
83 | (2) |
|
Guidelines and Constraints |
|
|
83 | (2) |
|
Building an App with Nibs and Constraints |
|
|
85 | (2) |
|
|
87 | (3) |
|
|
88 | (1) |
|
|
89 | (1) |
|
Designing Interfaces for Both iOS 6 and 7 |
|
|
90 | (1) |
|
|
91 | (4) |
|
|
92 | (1) |
|
|
93 | (2) |
6 Blocks and Operation Queues |
|
95 | (14) |
|
|
95 | (6) |
|
|
96 | (1) |
|
|
97 | (2) |
|
Methods with Block Parameters |
|
|
99 | (1) |
|
Blocks and Memory Management |
|
|
100 | (1) |
|
Modifying Local Variables from Inside Blocks with block |
|
|
100 | (1) |
|
Concurrency with Operation Queues |
|
|
101 | (3) |
|
Operation Queues and NSOperation |
|
|
102 | (1) |
|
Performing Work on Operation Queues |
|
|
102 | (2) |
|
|
104 | (5) |
7 Drawing Graphics in Views |
|
109 | (28) |
|
|
109 | (2) |
|
|
111 | (3) |
|
|
111 | (2) |
|
|
113 | (1) |
|
|
114 | (2) |
|
|
114 | (1) |
|
|
115 | (1) |
|
|
116 | (17) |
|
|
116 | (1) |
|
Filling with a Solid Color |
|
|
117 | (1) |
|
|
118 | (2) |
|
|
120 | (2) |
|
|
122 | (2) |
|
|
124 | (4) |
|
|
128 | (3) |
|
|
131 | (2) |
|
|
133 | (4) |
8 Audio and Video |
|
137 | (18) |
|
|
137 | (1) |
|
Playing Video with AVPlayer |
|
|
138 | (8) |
|
|
139 | (1) |
|
|
139 | (4) |
|
|
143 | (3) |
|
Playing Sound with AVAudioPlayer |
|
|
146 | (1) |
|
|
147 | (1) |
|
Working with the Photo Library |
|
|
148 | (7) |
|
Capturing Photos and Video from the Camera |
|
|
148 | (2) |
|
Building a Photo Application |
|
|
150 | (2) |
|
|
152 | (3) |
9 Model Objects and Data Storage |
|
155 | (18) |
|
|
156 | (2) |
|
|
158 | (2) |
|
Registering for Change Notifications |
|
|
158 | (2) |
|
Notifying Observers of Changes |
|
|
160 | (1) |
|
Notifications with NSNotification |
|
|
160 | (1) |
|
|
161 | (3) |
|
Registering Default Preferences |
|
|
162 | (1) |
|
|
163 | (1) |
|
|
164 | (1) |
|
Working with the Filesystem |
|
|
164 | (5) |
|
|
166 | (3) |
|
|
169 | (1) |
|
|
169 | (4) |
|
|
169 | (1) |
|
|
170 | (1) |
|
Security-Scoped Bookmarks |
|
|
171 | (2) |
10 Cocoa Bindings |
|
173 | (14) |
|
|
173 | (1) |
|
|
174 | (3) |
|
|
177 | (1) |
|
Array and Object Controllers |
|
|
178 | (1) |
|
A More Complex Bindings App |
|
|
179 | (8) |
11 Table Views and Collection Views |
|
187 | (20) |
|
Data Sources and Delegates |
|
|
187 | (1) |
|
|
188 | (1) |
|
|
188 | (8) |
|
|
189 | (1) |
|
|
189 | (1) |
|
|
190 | (3) |
|
Implementing a Table View |
|
|
193 | (3) |
|
|
196 | (6) |
|
|
200 | (1) |
|
NSTableView with Bindings |
|
|
201 | (1) |
|
|
202 | (5) |
|
|
202 | (5) |
12 Document-Based Applications |
|
207 | (20) |
|
The NSDocument and UlDocument Classes |
|
|
208 | (1) |
|
|
208 | (1) |
|
|
208 | (1) |
|
|
209 | (1) |
|
Document Based Applications on OS X |
|
|
210 | (8) |
|
|
210 | (1) |
|
Representing Documents with NSDocument |
|
|
211 | (1) |
|
|
212 | (2) |
|
|
214 | (4) |
|
Document-Based Applications on iOS |
|
|
218 | (9) |
13 Networking |
|
227 | (14) |
|
|
227 | (4) |
|
|
228 | (1) |
|
|
229 | (1) |
|
|
230 | (1) |
|
|
230 | (1) |
|
NSURLResponse and NSHTTPURLResponse |
|
|
231 | (1) |
|
Building a Networked Application |
|
|
231 | (2) |
|
Bonjour Service Discovery |
|
|
233 | (3) |
|
Browsing for Shared iTunes Libraries |
|
|
234 | (2) |
|
|
236 | (5) |
14 Working with the Real World |
|
241 | (28) |
|
|
241 | (7) |
|
|
242 | (1) |
|
The Core Location Framework |
|
|
243 | (2) |
|
Working with Core Location |
|
|
245 | (3) |
|
|
248 | (3) |
|
Region Monitoring and iBeacons |
|
|
251 | (1) |
|
|
252 | (4) |
|
|
253 | (1) |
|
|
253 | (1) |
|
|
254 | (1) |
|
|
255 | (1) |
|
|
256 | (5) |
|
|
257 | (4) |
|
|
261 | (3) |
|
|
262 | (1) |
|
|
263 | (1) |
|
|
264 | (3) |
|
|
267 | (2) |
15 Event Kit |
|
269 | (12) |
|
|
269 | (3) |
|
Accessing the Event Store |
|
|
270 | (1) |
|
|
271 | (1) |
|
|
271 | (1) |
|
|
272 | (1) |
|
Building an Events Application |
|
|
273 | (5) |
|
|
278 | (3) |
16 Instruments and the Debugger |
|
281 | (20) |
|
Getting Started with Instruments |
|
|
282 | (4) |
|
The Instruments Interface |
|
|
282 | (2) |
|
|
284 | (2) |
|
Adding Instruments from the Library |
|
|
286 | (1) |
|
Fixing Problems with Instruments |
|
|
286 | (6) |
|
|
292 | (3) |
|
|
295 | (6) |
|
|
295 | (4) |
|
Inspecting Memory Contents |
|
|
299 | (1) |
|
Working with the Debugger Console |
|
|
299 | (2) |
17 Sharing and Notifications |
|
301 | (14) |
|
|
301 | (6) |
|
|
304 | (2) |
|
|
306 | (1) |
|
|
307 | (8) |
|
|
307 | (1) |
|
Sending Push Notifications |
|
|
308 | (1) |
|
Setting Up to Receive Push Notifications |
|
|
309 | (2) |
|
Receiving Push Notifications |
|
|
311 | (2) |
|
|
313 | (2) |
18 Nonstandard Apps |
|
315 | (12) |
|
|
315 | (2) |
|
|
317 | (4) |
|
How Preference Panes Work |
|
|
317 | (1) |
|
|
318 | (1) |
|
Building a Sample Preference Pane |
|
|
319 | (2) |
|
|
321 | (2) |
|
Building a Status Bar App |
|
|
321 | (2) |
|
iOS Apps with Multiple Windows |
|
|
323 | (4) |
19 Working with Text |
|
327 | (10) |
|
Internationalization and Localization |
|
|
327 | (3) |
|
|
327 | (1) |
|
Creating a Sample Localized Application |
|
|
328 | (2) |
|
Formatting Data with NSFormatter |
|
|
330 | (3) |
|
Detecting Data with NSDataDetector |
|
|
333 | (2) |
|
|
335 | (2) |
20 iCloud |
|
337 | (16) |
|
|
337 | (1) |
|
|
338 | (2) |
|
Testing Whether iCloud Works |
|
|
340 | (1) |
|
|
340 | (5) |
|
|
345 | (8) |
Index |
|
353 | |