About the Author |
|
xi | |
About the Technical Reviewer |
|
xiii | |
|
Chapter 1 Understanding iOS Programming |
|
|
1 | (16) |
|
|
3 | (8) |
|
Manipulating the Xcode Panes |
|
|
11 | (4) |
|
|
15 | (2) |
|
Chapter 2 Designing User Interfaces with SwiftUI |
|
|
17 | (18) |
|
Modifying the User Interface with the Inspector Pane |
|
|
25 | (9) |
|
|
34 | (1) |
|
Chapter 3 Placing Views on the User Interface |
|
|
35 | (20) |
|
Using the Padding Modifier |
|
|
35 | (4) |
|
Defining Spacing Within a Stack |
|
|
39 | (1) |
|
Aligning Views Within a Stack |
|
|
40 | (2) |
|
|
42 | (5) |
|
Using the Offset and Position Modifiers |
|
|
47 | (5) |
|
|
52 | (3) |
|
Chapter 4 Working with Text |
|
|
55 | (20) |
|
Changing the Appearance of Text |
|
|
60 | (8) |
|
|
68 | (5) |
|
Adding a Border Around a Text or Label View |
|
|
73 | (1) |
|
|
74 | (1) |
|
Chapter 5 Working with Images |
|
|
75 | (14) |
|
|
75 | (5) |
|
|
76 | (1) |
|
Coloring a Shape with Gradients |
|
|
77 | (3) |
|
|
80 | (7) |
|
|
82 | (1) |
|
|
83 | (1) |
|
Adding a Border Around Images |
|
|
84 | (2) |
|
Defining the Opacity of an Image |
|
|
86 | (1) |
|
|
87 | (2) |
|
Chapter 6 Responding to the User with Buttons and Segmented Controls |
|
|
89 | (18) |
|
|
92 | (5) |
|
Using a Segmented Control |
|
|
97 | (9) |
|
Running Code from a Segmented Control |
|
|
102 | (4) |
|
|
106 | (1) |
|
Chapter 7 Retrieving Text from Text Fields and Text Editors |
|
|
107 | (14) |
|
|
108 | (12) |
|
Changing the Text Field Style |
|
|
108 | (1) |
|
Creating Secure Text Fields |
|
|
109 | (1) |
|
Using Autocorrect and Text Content |
|
|
109 | (2) |
|
Defining Different Keyboards |
|
|
111 | (2) |
|
Dismissing the Virtual Keyboard |
|
|
113 | (3) |
|
|
116 | (4) |
|
|
120 | (1) |
|
Chapter 8 Limiting Choices with Pickers |
|
|
121 | (20) |
|
|
121 | (5) |
|
|
126 | (3) |
|
|
129 | (11) |
|
Choosing a Date Picker Style |
|
|
130 | (1) |
|
Displaying a Date and/or Time |
|
|
131 | (1) |
|
|
131 | (6) |
|
|
137 | (3) |
|
|
140 | (1) |
|
Chapter 9 Limiting Choices with Toggles, Steppers, and Sliders |
|
|
141 | (14) |
|
|
142 | (2) |
|
|
144 | (5) |
|
Defining a Range in a Stepper |
|
|
146 | (1) |
|
Defining an Increment/Decrement Value in a Stepper |
|
|
147 | (2) |
|
|
149 | (4) |
|
Changing the Color of a Slider |
|
|
150 | (1) |
|
Defining a Range for a Slider |
|
|
150 | (1) |
|
Defining a Step Increment for a Slider |
|
|
150 | (1) |
|
Displaying Minimum and Maximum Labels on a Slider |
|
|
151 | (2) |
|
|
153 | (2) |
|
Chapter 10 Providing Options with Links and Menus |
|
|
155 | (12) |
|
|
156 | (1) |
|
|
156 | (9) |
|
Formatting Titles on the Menu and Buttons |
|
|
160 | (2) |
|
|
162 | (3) |
|
|
165 | (2) |
|
Chapter 11 Touch Gestures |
|
|
167 | (30) |
|
|
167 | (2) |
|
Detecting Long Press Gestures |
|
|
169 | (3) |
|
Detecting Magnification Gestures |
|
|
172 | (5) |
|
Detecting Rotation Gestures |
|
|
177 | (4) |
|
|
181 | (4) |
|
Defining Priority and Simultaneous Gestures |
|
|
185 | (10) |
|
Defining a High Priority Gesture |
|
|
188 | (4) |
|
Defining Simultaneous Gestures |
|
|
192 | (3) |
|
|
195 | (2) |
|
Chapter 12 Using Alerts, Action Sheets, and Contextual Menus |
|
|
197 | (20) |
|
Displaying an Alert/Action Sheet |
|
|
198 | (13) |
|
Displaying and Responding to Multiple Buttons |
|
|
201 | (4) |
|
Making Alert/ActionSheet Buttons Responsive |
|
|
205 | (6) |
|
|
211 | (4) |
|
|
215 | (2) |
|
Chapter 13 Displaying Lists |
|
|
217 | (32) |
|
Displaying Array Data in a List |
|
|
219 | (3) |
|
Displaying Arrays of Structures in a List |
|
|
222 | (3) |
|
Creating Groups in a List |
|
|
225 | (6) |
|
Adding Line Separators to a List |
|
|
231 | (4) |
|
Adding Swipe Gestures to a List |
|
|
235 | (13) |
|
Deleting Items from a List |
|
|
235 | (3) |
|
|
238 | (5) |
|
Creating Custom Swipe Actions for a List |
|
|
243 | (5) |
|
|
248 | (1) |
|
Chapter 14 Using Forms and Group Boxes |
|
|
249 | (16) |
|
|
250 | (4) |
|
Dividing a Form into Sections |
|
|
254 | (4) |
|
Disabling Views in a Form |
|
|
258 | (3) |
|
|
261 | (3) |
|
|
264 | (1) |
|
Chapter 15 Using Disclosure Groups, Scroll Views, and Outline Groups |
|
|
265 | (14) |
|
|
266 | (3) |
|
|
269 | (2) |
|
|
271 | (6) |
|
|
277 | (2) |
|
Chapter 16 Using the Navigation View |
|
|
279 | (36) |
|
|
280 | (2) |
|
Adding Buttons to a Navigation Bar |
|
|
282 | (4) |
|
Adding Links to a Navigation View |
|
|
286 | (22) |
|
Displaying Structures in a Navigation View |
|
|
289 | (4) |
|
Passing Data Between Structures in a Navigation View |
|
|
293 | (5) |
|
Changing Data Between Structures in a Navigation View |
|
|
298 | (4) |
|
Sharing Data Between Structures in a Navigation View |
|
|
302 | (6) |
|
Using Lists in a Navigation View |
|
|
308 | (6) |
|
|
314 | (1) |
|
Chapter 17 Using the Tab View |
|
|
315 | (38) |
|
|
316 | (8) |
|
Selecting Buttons Programmatically in a Tab Bar |
|
|
324 | (3) |
|
|
327 | (4) |
|
Displaying Structures in a Tab View |
|
|
331 | (19) |
|
Passing Data Between Structures in a Tab View |
|
|
336 | (5) |
|
Changing Data Between Structures in a Tab View |
|
|
341 | (4) |
|
Sharing Data Between Structures in a Tab View |
|
|
345 | (5) |
|
|
350 | (3) |
|
|
353 | (14) |
|
Defining Multiple Rows/Columns |
|
|
357 | (4) |
|
Adjusting Spacing Between Rows/Columns |
|
|
361 | (4) |
|
|
365 | (2) |
|
Chapter 19 Using Animation |
|
|
367 | (26) |
|
|
367 | (4) |
|
|
371 | (2) |
|
|
373 | (3) |
|
|
376 | (11) |
|
Using Delays and Duration in Animation |
|
|
378 | (4) |
|
Using an Interpolating Spring in Animation |
|
|
382 | (5) |
|
|
387 | (5) |
|
|
392 | (1) |
|
Chapter 20 Using GeometryReader |
|
|
393 | (14) |
|
Understanding the Geometry Reader |
|
|
393 | (5) |
|
Understanding the Differences Between Global and Local Coordinates |
|
|
398 | (5) |
|
Identifying Minimum, Mid, and Maximum Values of a GeometryReader |
|
|
403 | (3) |
|
|
406 | (1) |
|
Appendix: An Introduction to Swift |
|
|
407 | (52) |
|
|
411 | (11) |
|
Storing Different Data Types |
|
|
414 | (4) |
|
Using Optional Data Types |
|
|
418 | (4) |
|
|
422 | (1) |
|
Mathematical and String Operators |
|
|
423 | (3) |
|
|
426 | (8) |
|
|
426 | (2) |
|
|
428 | (1) |
|
|
429 | (3) |
|
|
432 | (2) |
|
|
434 | (5) |
|
|
435 | (2) |
|
|
437 | (1) |
|
|
438 | (1) |
|
|
439 | (2) |
|
|
441 | (11) |
|
|
442 | (3) |
|
|
445 | (1) |
|
Storing Data in Dictionaries |
|
|
446 | (4) |
|
Storing Data in Structures |
|
|
450 | (2) |
|
Classes and Object-Oriented Programming |
|
|
452 | (6) |
|
Understanding Encapsulation |
|
|
452 | (2) |
|
Understanding Inheritance |
|
|
454 | (2) |
|
Understanding Polymorphism |
|
|
456 | (2) |
|
|
458 | (1) |
Index |
|
459 | |