Intro |
|
xxi | |
|
1 Getting started: Getting mobile with iOS |
|
|
1 | (30) |
|
2 Basic iOS patterns: Building from scratch |
|
|
31 | (64) |
|
|
79 | (16) |
|
3 Tables, views, and data: A table with a view |
|
|
95 | (46) |
|
4 Multiview applications: It's all about the details |
|
|
141 | (38) |
|
5 The review process, design, and devices: How to live with Apple |
|
|
179 | (28) |
|
6 Basic core data and table view cells: Reruns are hard to find |
|
|
207 | (38) |
|
7 Implementing search with Core Data: Looking for info |
|
|
245 | (24) |
|
8 Core Data, map kit, and core location: Finding a phone booth |
|
|
269 | |
Intro Who is this book for? |
|
xxii | |
We know what you're thinking |
|
xxiii | |
Metacognition |
|
xxv | |
Bend your brain into submission |
|
xxvii | |
Read me |
|
xxviii | |
The technical review team |
|
xxx | |
Acknowledgments |
|
xxxi | |
|
|
|
1 Getting mobile with iOS |
|
|
|
So you want to build an iOS app... |
|
|
2 | (1) |
|
Welcome to the Apple universe! |
|
|
3 | (1) |
|
iOS apps are written in Objective-C |
|
|
4 | (1) |
|
It all starts with the SDK |
|
|
5 | (1) |
|
|
6 | (1) |
|
Xcode and Git... new best friends |
|
|
7 | (2) |
|
Xcode is the hub of your iOS project |
|
|
9 | (2) |
|
|
11 | (4) |
|
Your code is stored in source files |
|
|
15 | (5) |
|
Code Editor, Hub... and debugging, too |
|
|
20 | (2) |
|
One iPhone, two iPhones, red iPhone, blue iPhone... |
|
|
22 | (7) |
|
Your iPhone Development toolbox |
|
|
29 | (3) |
|
|
|
|
|
iOS apps run full screen, but there's a lot going on |
|
|
32 | (1) |
|
Model-View-Controller is a design pattern |
|
|
33 | (4) |
|
Get started with Xcode and Git |
|
|
37 | (2) |
|
|
39 | (2) |
|
|
41 | (5) |
|
Cosmetic changes are easy in Xcode |
|
|
46 | (1) |
|
iOS controls are more than skin deep |
|
|
47 | (2) |
|
You'll create the action using the Xcode GUI editor |
|
|
49 | (2) |
|
Connect your controls to your actions |
|
|
51 | (9) |
|
So how do we get to that text? |
|
|
60 | (1) |
|
Properties handle creating getters and setters |
|
|
61 | (2) |
|
Create a property for that text field |
|
|
63 | (2) |
|
You connect your controls to outlets |
|
|
65 | (3) |
|
|
68 | (10) |
|
|
78 | (2) |
|
|
|
|
|
Classes: Interface and Implementation |
|
|
80 | (1) |
|
Header files describe the interface to your class |
|
|
81 | (3) |
|
Properties are about efficiency |
|
|
84 | (3) |
|
Message passing: How Objective-C gets around |
|
|
87 | (4) |
|
|
91 | (2) |
|
|
93 | (3) |
|
|
|
|
|
|
96 | (1) |
|
SpinCity browsing app overview |
|
|
97 | (1) |
|
|
98 | (2) |
|
Hierarchical data---get out your table view |
|
|
100 | (3) |
|
We need to hook these views together... |
|
|
103 | (3) |
|
Three views in one template |
|
|
106 | (5) |
|
Use MVC to separate your concerns... |
|
|
111 | (1) |
|
|
112 | (2) |
|
Properties expose class attributes |
|
|
114 | (3) |
|
Data Access Objects hide low-level data access |
|
|
117 | (4) |
|
|
121 | (6) |
|
A table is a collection of cells |
|
|
127 | (12) |
|
|
139 | (3) |
|
|
|
4 It's all about the details |
|
|
|
|
142 | (2) |
|
Table views don't always look like... tables |
|
|
144 | (2) |
|
Change your UIViewController to a UITableView Controller |
|
|
146 | (2) |
|
Layout for the new detail view |
|
|
148 | (1) |
|
Layout your view within the storyboard |
|
|
149 | (4) |
|
Segues connect view controllers |
|
|
153 | (1) |
|
Connect your scenes in your storyboard |
|
|
154 | (9) |
|
Segues let you prepare for a new scene |
|
|
163 | (1) |
|
Update your prepareforSegue callback |
|
|
164 | (3) |
|
|
167 | (1) |
|
Create a new property list |
|
|
168 | (2) |
|
You need to load each album from the plist |
|
|
170 | (1) |
|
Convert your data to plists in one easy step |
|
|
171 | (6) |
|
|
177 | (4) |
|
The review process, design, and devices |
|
|
|
|
|
It's Apple's world... you're just living in it |
|
|
181 | (6) |
|
Device checking... it's not optional |
|
|
187 | (1) |
|
Device checking case study: the camera |
|
|
188 | (1) |
|
iOS handles the heavy lifting |
|
|
188 | (1) |
|
Hmmm... supported device, missing feature |
|
|
189 | (2) |
|
The HIG helps, rather than hurting you |
|
|
191 | (1) |
|
You've already gotten used to the HIG... |
|
|
192 | (3) |
|
|
195 | (1) |
|
More to think about: Your iPad is not your iPhone |
|
|
196 | (9) |
|
|
205 | (3) |
|
Basic Core Data and Table View Cells |
|
|
|
6 Reruns are hard to find |
|
|
|
|
208 | (1) |
|
This is your application on data |
|
|
209 | (1) |
|
|
210 | (1) |
|
|
211 | (1) |
|
|
211 | (1) |
|
|
212 | (2) |
|
Core Data starts with... data |
|
|
214 | (3) |
|
Core Data works with entities |
|
|
217 | (1) |
|
Core Data describes entities with a Managed Object Model |
|
|
218 | (1) |
|
|
219 | (15) |
|
You have an object... now present it |
|
|
234 | (1) |
|
Present each entity in Gilligizer |
|
|
235 | (8) |
|
|
243 | (3) |
|
Implementing Search with Core Data |
|
|
|
|
|
The app is working, but it's limited... |
|
|
246 | (5) |
|
Use an NSFetchRequest to describe your search |
|
|
251 | (1) |
|
|
251 | (3) |
|
iOS 7 has Core Data and UIKit support for searching |
|
|
254 | (1) |
|
Use predicates for filtering data |
|
|
255 | (1) |
|
The NSFetchRequest predicate controls what data is returned |
|
|
256 | (2) |
|
It was a trick question... |
|
|
258 | (9) |
|
|
267 | (3) |
|
Core Data, Map Kit, and Core Location |
|
|
|
|
|
Everything old is new again |
|
|
270 | (1) |
|
An app, an iPad, and a phone booth |
|
|
271 | (10) |
|
iOS apps are read-only (well, kind of...) |
|
|
281 | (1) |
|
An iOS application structure defines where you can read and write data |
|
|
282 | (1) |
|
|
283 | (7) |
|
Prompt the user with action sheets |
|
|
290 | (8) |
|
Core Location can find you in a few ways |
|
|
298 | (11) |
|
Map Kit comes with every iOS device |
|
|
309 | (7) |
|
Annotations require a little more work |
|
|
316 | (1) |
|
Fully implement the annotation protocol |
|
|
317 | (4) |
|
|
321 | |