Introduction |
|
1 | (6) |
|
Who Should Read This Book |
|
|
1 | (1) |
|
Some Points to Keep in Mind |
|
|
2 | (1) |
|
How This Book Is Organized |
|
|
3 | (4) |
Part I: Getting Started with Core Data |
|
|
Hour 1: Introducing Xcode 4 |
|
|
7 | (42) |
|
|
8 | (1) |
|
|
8 | (3) |
|
Hello, App Development for Mac OS X and iOS |
|
|
11 | (2) |
|
Getting Started with Xcode |
|
|
13 | (2) |
|
|
15 | (10) |
|
|
25 | (4) |
|
|
29 | (2) |
|
Getting Help in an Editor Window |
|
|
31 | (1) |
|
Using Utilities-Inspectors |
|
|
31 | (4) |
|
Using Utilities-Libraries |
|
|
35 | (5) |
|
|
40 | (5) |
|
Using the Organizer Window |
|
|
45 | (2) |
|
|
47 | (1) |
|
|
48 | (1) |
|
|
48 | (1) |
|
Hour 2: Creating a Simple App |
|
|
49 | (14) |
|
|
49 | (3) |
|
|
52 | (6) |
|
|
58 | (2) |
|
|
60 | (1) |
|
|
60 | (1) |
|
|
61 | (2) |
|
Hour 3: Understanding the Basic Code Structure |
|
|
63 | (22) |
|
|
63 | (3) |
|
Looking at Object-Oriented Programming in the Context of Objective-C |
|
|
66 | (2) |
|
Using Declared Properties |
|
|
68 | (5) |
|
|
73 | (2) |
|
Using Protocols and Delegates |
|
|
75 | (6) |
|
Using the Model/View/Controller Concepts |
|
|
81 | (1) |
|
Importing and Using Declarations in Files |
|
|
82 | (1) |
|
|
83 | (1) |
|
|
84 | (1) |
|
|
84 | (1) |
Part II: Using Core Data |
|
|
Hour 4: Getting the Big Core Data Picture |
|
|
85 | (16) |
|
Starting Out with Core Data |
|
|
85 | (5) |
|
Examining Core Data at Runtime: The Core Data Stack |
|
|
90 | (6) |
|
Working with Fetched Results |
|
|
96 | (3) |
|
|
99 | (1) |
|
|
99 | (1) |
|
|
99 | (2) |
|
Hour 5: Working with Data Models |
|
|
101 | (16) |
|
Making the Abstract Concrete |
|
|
101 | (2) |
|
|
103 | (2) |
|
Adding Attributes to Entities |
|
|
105 | (2) |
|
Linking Entities with Relationships |
|
|
107 | (1) |
|
Keeping Track of Your Data in Files and Documents |
|
|
108 | (8) |
|
|
116 | (1) |
|
|
116 | (1) |
|
|
116 | (1) |
|
Hour 6: Working with the Core Data Model Editor |
|
|
117 | (16) |
|
Moving the Data Model from Paper to Xcode and the Core Data Model Editor |
|
|
117 | (2) |
|
Adding Entities to the Data Model |
|
|
119 | (6) |
|
Choosing the Editor Style |
|
|
125 | (1) |
|
Adding Relationships to a Data Model |
|
|
126 | (6) |
|
|
132 | (1) |
|
|
132 | (1) |
|
|
132 | (1) |
|
Hour 7: What Managed Objects Can Do |
|
|
133 | (10) |
|
|
133 | (1) |
|
Deciding Whether to Override NSManagedObject |
|
|
134 | (2) |
|
Overriding NSManagedObject |
|
|
136 | (4) |
|
Implementing Transformation in an NSManagedObject Subclass |
|
|
140 | (2) |
|
|
142 | (1) |
|
|
142 | (1) |
|
|
142 | (1) |
|
Hour 8: Controllers: Integrating the Data Model with Your Code |
|
|
143 | (10) |
|
Looking Inside Model/View/Controller |
|
|
143 | (4) |
|
Integrating Views and Data on Mac OS |
|
|
147 | (4) |
|
Integrating Views and Data on iOS |
|
|
151 | (1) |
|
|
152 | (1) |
|
|
152 | (1) |
|
|
152 | (1) |
|
|
153 | (18) |
|
Choosing the Core Data Architecture |
|
|
153 | (1) |
|
Exploring the Core Data Fetching Process |
|
|
154 | (4) |
|
Using Managed Object Contexts |
|
|
158 | (1) |
|
Creating and Using a Fetch Request |
|
|
159 | (2) |
|
Stopping the Action to Add New Data |
|
|
161 | (1) |
|
Optimizing Interfaces for Core Data |
|
|
162 | (6) |
|
|
168 | (1) |
|
|
168 | (1) |
|
|
169 | (2) |
|
Hour 10: Working with Predicates and Sorting |
|
|
171 | (18) |
|
|
171 | (6) |
|
|
177 | (1) |
|
Creating a Fetch Request and Predicate with Xcode |
|
|
178 | (7) |
|
|
185 | (2) |
|
|
187 | (1) |
|
|
187 | (1) |
|
|
187 | (2) |
Part III: Developing the Core Data Interface |
|
|
Hour 11: Finding Your Way Around the Interface Builder Editor: The Graphics Story |
|
|
189 | (20) |
|
Starting to Work with the Interface Builder Editor in Xcode |
|
|
189 | (8) |
|
|
197 | (9) |
|
|
206 | (1) |
|
|
206 | (1) |
|
|
207 | (2) |
|
Hour 12: Finding Your Way Around the Interface Builder Editor: The Code Story |
|
|
209 | (14) |
|
Using the Connections Inspector |
|
|
209 | (6) |
|
Using IBOutlets for Data Elements |
|
|
215 | (7) |
|
|
222 | (1) |
|
|
222 | (1) |
|
|
222 | (1) |
|
Hour 13: Control-Dragging Your Way to Code |
|
|
223 | (16) |
|
Repurposing the Master-Detail Application Template |
|
|
223 | (7) |
|
Adding New Fields as IBOutlets |
|
|
230 | (7) |
|
|
237 | (1) |
|
|
237 | (1) |
|
|
238 | (1) |
|
Hour 14: Working with Storyboards and Swapping Views |
|
|
239 | (18) |
|
Creating a Project with a Storyboard |
|
|
239 | (2) |
|
Swapping Views on iOS Devices |
|
|
241 | (3) |
|
Swapping Detail Views (the Old Way) |
|
|
244 | (2) |
|
Understanding the Storyboard Concept |
|
|
246 | (2) |
|
Looking at the Estimator Storyboard and Code |
|
|
248 | (3) |
|
|
251 | (3) |
|
|
254 | (1) |
|
|
255 | (1) |
|
|
255 | (2) |
Part IV: Building the Core Data Code |
|
|
Hour 15: Saving Data with a Navigation Interface |
|
|
257 | (22) |
|
Using a Navigation Interface to Edit and Save Data |
|
|
257 | (6) |
|
Starting from the Master-Detail Template |
|
|
263 | (4) |
|
Using the Debugger to Watch the Action |
|
|
267 | (5) |
|
|
272 | (1) |
|
|
273 | (2) |
|
Cleaning Up the Interface |
|
|
275 | (2) |
|
|
277 | (1) |
|
|
278 | (1) |
|
|
278 | (1) |
|
Hour 16: Using Split Views on iPad |
|
|
279 | (10) |
|
|
279 | (2) |
|
Implementing the Second Interface |
|
|
281 | (3) |
|
Changing the Data Update and Saving Code |
|
|
284 | (3) |
|
|
287 | (1) |
|
|
287 | (1) |
|
|
288 | (1) |
|
Hour 17: Structuring Apps for Core Data, Documents, and Shoeboxes |
|
|
289 | (28) |
|
Looking at Apps from the Core Data Point of View: The Role of Documents |
|
|
289 | (3) |
|
Exploring App Structure for Documents, Mac OS, and iOS |
|
|
292 | (19) |
|
|
311 | (1) |
|
Moving a Data Model from One Project to Another |
|
|
312 | (3) |
|
|
315 | (1) |
|
|
316 | (1) |
|
|
316 | (1) |
|
|
317 | (20) |
|
Using Validation Rules in the Data Model |
|
|
317 | (3) |
|
Setting Up Rules in Your Data Model |
|
|
320 | (7) |
|
Entering Data into the Interface and Moving It to the Data Model (and Vice Versa) |
|
|
327 | (4) |
|
Creating Subclasses of NSManagedObject for Your Entities |
|
|
331 | (4) |
|
|
335 | (1) |
|
|
336 | (1) |
|
|
336 | (1) |
Part V: Managing Data and Interfaces |
|
|
Hour 19: Using UITableView on IOS |
|
|
337 | (26) |
|
Working with Table Views and iOS, Mac OS, and Core Data |
|
|
337 | (2) |
|
Comparing Interfaces: Settings on iOS and System Preferences on Mac OS |
|
|
339 | (5) |
|
Using UITableView Without Core Data |
|
|
344 | (13) |
|
Using UITableView with Core Data |
|
|
357 | (3) |
|
|
360 | (1) |
|
|
361 | (1) |
|
|
361 | (2) |
|
Hour 20: Using NSTableView on Mac OS |
|
|
363 | (12) |
|
Exploring the New NSTableView Features |
|
|
363 | (3) |
|
Building an NSTableView App |
|
|
366 | (7) |
|
|
373 | (1) |
|
|
374 | (1) |
|
|
374 | (1) |
|
Hour 21: Rearranging Table Rows on iOS |
|
|
375 | (18) |
|
Handling the Ordering of Table Rows |
|
|
375 | (5) |
|
Allowing a Table Row to Be Moved |
|
|
380 | (2) |
|
|
382 | (9) |
|
|
391 | (1) |
|
|
392 | (1) |
|
|
392 | (1) |
|
Hour 22: Managing Validation |
|
|
393 | (16) |
|
|
393 | (1) |
|
|
394 | (8) |
|
Programming Validation for iOS or Mac OS |
|
|
402 | (5) |
|
|
407 | (1) |
|
|
407 | (1) |
|
|
408 | (1) |
|
Hour 23: Interacting with Users |
|
|
409 | (14) |
|
Choosing an Editing Interface |
|
|
409 | (4) |
|
|
413 | (6) |
|
Using Sheets and Modal Windows on Mac OS |
|
|
419 | (3) |
|
|
422 | (1) |
|
|
422 | (1) |
|
|
422 | (1) |
|
Hour 24: Migrating Data Models |
|
|
423 | (18) |
|
Introducing the Core Data Migration Continuum |
|
|
423 | (1) |
|
Managing Data Model Migration |
|
|
424 | (2) |
|
Working with Data Model Versions |
|
|
426 | (6) |
|
Using Automatic Lightweight Migration |
|
|
432 | (2) |
|
Looking at a Mapping Model Overview |
|
|
434 | (4) |
|
|
438 | (1) |
|
|
438 | (1) |
|
|
439 | (2) |
Appendix A: What's Old in Core Data, Cocoa, Xcode, and Objective-C |
|
441 | (2) |
|
|
441 | (1) |
|
Required and Optional Methods in Protocols |
|
|
442 | (1) |
|
Storyboards in Interface Builder |
|
|
442 | (1) |
|
|
442 | (1) |
Index |
|
443 | |