About the Author |
|
ix | |
About the Technical Reviewer |
|
xi | |
Chapter 1 Organizing Code |
|
1 | (18) |
|
Using the II MARK: Comment |
|
|
4 | (3) |
|
|
7 | (4) |
|
|
11 | (5) |
|
Creating Custom Code Snippets |
|
|
13 | (2) |
|
Editing and Deleting Custom Code Snippets |
|
|
15 | (1) |
|
|
16 | (2) |
|
|
18 | (1) |
Chapter 2 Debugging Code |
|
19 | (20) |
|
Simple Debugging Techniques |
|
|
22 | (4) |
|
|
26 | (11) |
|
|
27 | (1) |
|
|
28 | (3) |
|
|
31 | (1) |
|
Using Symbolic Breakpoints |
|
|
32 | (3) |
|
Using Conditional Breakpoints |
|
|
35 | (2) |
|
|
37 | (2) |
Chapter 3 Understanding Closures |
|
39 | (14) |
|
Closures with Multiple Parameters |
|
|
42 | (1) |
|
Understanding Value Capturing |
|
|
43 | (1) |
|
|
44 | (2) |
|
|
46 | (4) |
|
Passing Parameters to a Trailing Closure |
|
|
48 | (1) |
|
Passing Parameters and Returning a Value from a Trailing Closure |
|
|
49 | (1) |
|
|
50 | (3) |
Chapter 4 Multithreaded Programming Using Grand Central Dispatch |
|
53 | (20) |
|
|
54 | (6) |
|
Using Grand Central Dispatch |
|
|
60 | (7) |
|
|
67 | (5) |
|
|
72 | (1) |
Chapter 5 Understanding Concurrency |
|
73 | (12) |
|
Concurrency with Async/Await |
|
|
74 | (4) |
|
Using Concurrency with User Interfaces |
|
|
78 | (5) |
|
|
83 | (2) |
Chapter 6 Understanding Data Persistence |
|
85 | (32) |
|
Storing Preferences in UserDefaults |
|
|
86 | (5) |
|
Reading and Writing to Files |
|
|
91 | (4) |
|
|
95 | (21) |
|
Creating a Data Model File |
|
|
96 | (5) |
|
Adding Core Data to an Existing Project |
|
|
101 | (15) |
|
|
116 | (1) |
Chapter 7 Sharing Data Between Structures |
|
117 | (20) |
|
Sharing Data with Bindings |
|
|
117 | (7) |
|
Sharing Data with StateObject and ObservedObject |
|
|
124 | (6) |
|
Sharing Data with EnvironmentObject |
|
|
130 | (6) |
|
|
136 | (1) |
Chapter 8 Translating with Localization |
|
137 | (28) |
|
Creating a Localization File |
|
|
138 | (7) |
|
Defining Multiple Previews |
|
|
145 | (3) |
|
Using a LocalizableStringKey |
|
|
148 | (3) |
|
Using String Interpolation with Localizable Strings |
|
|
151 | (4) |
|
Formatting Numbers and Dates |
|
|
155 | (3) |
|
|
158 | (6) |
|
|
164 | (1) |
Chapter 9 Adding Search to an App |
|
165 | (12) |
|
Adding a Search Bar to a List View |
|
|
166 | (3) |
|
Changing the Placeholder Text in the Search Bar |
|
|
169 | (1) |
|
Making the Search Bar Visible Initially |
|
|
170 | (2) |
|
Adding Suggestions to the Search Bar |
|
|
172 | (3) |
|
|
175 | (2) |
Chapter 10 Detecting Motion and Orientation |
|
177 | (20) |
|
Understanding Core Motion |
|
|
177 | (18) |
|
|
178 | (6) |
|
Detecting Rotation with the Gyroscope |
|
|
184 | (4) |
|
Detecting Magnetic Fields |
|
|
188 | (4) |
|
Detecting Device Motion Data |
|
|
192 | (3) |
|
|
195 | (2) |
Chapter 11 Using Location and Maps |
|
197 | (18) |
|
|
197 | (8) |
|
|
198 | (1) |
|
Defining a Distance Filter |
|
|
199 | (1) |
|
|
200 | (1) |
|
|
200 | (1) |
|
|
201 | (4) |
|
|
205 | (3) |
|
|
208 | (2) |
|
|
210 | (3) |
|
|
213 | (2) |
Chapter 12 Playing Audio and Video |
|
215 | (16) |
|
|
216 | (5) |
|
|
221 | (4) |
|
|
225 | (5) |
|
|
230 | (1) |
Chapter 13 Using Speech |
|
231 | (22) |
|
Converting Speech to Text |
|
|
231 | (9) |
|
Recognizing Spoken Commands |
|
|
240 | (8) |
|
|
248 | (3) |
|
|
251 | (2) |
Chapter 14 Integrating SwiftUI with UIKit |
|
253 | (20) |
|
|
254 | (4) |
|
|
258 | (4) |
|
Integrating SwiftUI into Storyboard Projects |
|
|
262 | (10) |
|
|
272 | (1) |
Chapter 15 Using the Photo Library and the Camera |
|
273 | (14) |
|
|
274 | (1) |
|
Designing a Simple User Interface |
|
|
275 | (3) |
|
|
278 | (5) |
|
|
283 | (2) |
|
|
285 | (2) |
Chapter 16 Using Facial Recognition |
|
287 | (16) |
|
Recognizing Faces in Pictures |
|
|
287 | (6) |
|
Highlighting Faces in an Image |
|
|
293 | (9) |
|
|
302 | (1) |
Chapter 17 Using Machine Learning |
|
303 | (22) |
|
Understanding Machine Learning |
|
|
304 | (2) |
|
|
306 | (2) |
|
|
308 | (13) |
|
|
321 | (3) |
|
|
324 | (1) |
Chapter 18 Handling Errors |
|
325 | (18) |
|
Using the Guard Statement |
|
|
326 | (5) |
|
Using the Do-Try-Catch Statement |
|
|
331 | (6) |
|
|
337 | (4) |
|
|
341 | (2) |
Index |
|
343 | |