About the Author |
|
xiii | |
About the Technical Reviewer |
|
xv | |
|
Chapter 1 Understanding iOS Programming |
|
|
1 | (20) |
|
|
5 | (15) |
|
|
20 | (1) |
|
Chapter 2 Designing User Interfaces |
|
|
21 | (30) |
|
Learning About Views and Class Files |
|
|
32 | (7) |
|
Working with Different Screen Sizes |
|
|
39 | (6) |
|
Previewing the User Interface |
|
|
45 | (4) |
|
|
49 | (2) |
|
Chapter 3 Writing Swift Code |
|
|
51 | (22) |
|
Creating IBOutlet Variables |
|
|
53 | (7) |
|
Creating IBAction Methods |
|
|
60 | (5) |
|
|
65 | (2) |
|
|
67 | (4) |
|
Getting Help with Swift Commands |
|
|
69 | (2) |
|
Folding and Unfolding Functions |
|
|
71 | (1) |
|
|
71 | (2) |
|
|
73 | (20) |
|
Changing Xcode's Appearance |
|
|
73 | (11) |
|
|
74 | (4) |
|
|
78 | (4) |
|
|
82 | (2) |
|
|
84 | (3) |
|
Renaming and Deleting IBOutlet Variables |
|
|
87 | (3) |
|
|
90 | (3) |
|
Chapter 5 Working with Controllers |
|
|
93 | (24) |
|
Understanding Controllers |
|
|
93 | (6) |
|
Working with Multiple Controllers |
|
|
99 | (3) |
|
Transitioning Between Controllers |
|
|
102 | (6) |
|
Embedding in a Navigation Controller |
|
|
108 | (4) |
|
Using a Navigation Controller |
|
|
112 | (2) |
|
|
114 | (3) |
|
Chapter 6 Adding User Interface Objects |
|
|
117 | (32) |
|
Changing the Size and Position of Objects |
|
|
118 | (4) |
|
Changing an Object's Attributes |
|
|
122 | (2) |
|
Understanding the Safe Area |
|
|
124 | (4) |
|
|
128 | (19) |
|
Defining Constraints Automatically |
|
|
129 | (4) |
|
Viewing and Deleting Constraints |
|
|
133 | (2) |
|
Adding Constraints Manually |
|
|
135 | (8) |
|
|
143 | (4) |
|
|
147 | (2) |
|
Chapter 7 Using Common User Interface Objects |
|
|
149 | (34) |
|
|
151 | (10) |
|
|
161 | (17) |
|
Defining Different Keyboards |
|
|
169 | (2) |
|
Defining the Content of a Text Field |
|
|
171 | (3) |
|
Modifying the Appearance of a Text Field |
|
|
174 | (4) |
|
|
178 | (2) |
|
|
180 | (3) |
|
Chapter 8 Steppers, Sliders, Progress Views, and Activity Indicator Views |
|
|
183 | (22) |
|
|
184 | (6) |
|
|
190 | (5) |
|
Modifying a Slider with Swift Code |
|
|
193 | (2) |
|
Using the Progress and Activity Indicator Views |
|
|
195 | (4) |
|
|
199 | (5) |
|
|
204 | (1) |
|
Chapter 9 Image Views and Text Views |
|
|
205 | (22) |
|
|
205 | (8) |
|
Making the Image View Interactive |
|
|
210 | (3) |
|
|
213 | (13) |
|
Changing Text Appearance in a Text View |
|
|
217 | (2) |
|
Creating Clickable Text in a Text View |
|
|
219 | (3) |
|
Displaying the Virtual Keyboard with a Text View |
|
|
222 | (4) |
|
|
226 | (1) |
|
Chapter 10 Buttons, Switches, and Segmented Controls |
|
|
227 | (26) |
|
|
228 | (1) |
|
|
229 | (3) |
|
|
232 | (4) |
|
Using a Segmented Control |
|
|
236 | (5) |
|
Connecting Multiple Objects to the Same IBAction Method |
|
|
241 | (11) |
|
|
252 | (1) |
|
Chapter 11 Touch Gestures |
|
|
253 | (54) |
|
|
254 | (9) |
|
|
263 | (7) |
|
Detecting Rotation Gestures |
|
|
270 | (7) |
|
|
277 | (7) |
|
Detecting Screen Edge Pan Gestures |
|
|
284 | (7) |
|
|
291 | (9) |
|
Detecting Long Press Gestures |
|
|
300 | (6) |
|
|
306 | (1) |
|
Chapter 12 Using Alerts and Pickers |
|
|
307 | (34) |
|
Using an Alert Controller |
|
|
308 | (12) |
|
Displaying and Responding to Multiple Buttons |
|
|
311 | (4) |
|
Displaying a Text Field on an Alert Controller |
|
|
315 | (5) |
|
|
320 | (7) |
|
|
327 | (12) |
|
Displaying a Multiple-Component Picker View |
|
|
333 | (6) |
|
|
339 | (2) |
|
Chapter 13 Constraints and Stack Views |
|
|
341 | (20) |
|
Understanding Constraints |
|
|
342 | (11) |
|
|
353 | (6) |
|
|
359 | (2) |
|
Chapter 14 Using Table Views |
|
|
361 | (44) |
|
Creating a Simple Table View |
|
|
362 | (12) |
|
Selecting an Item in a Table View |
|
|
374 | (3) |
|
|
377 | (10) |
|
|
387 | (8) |
|
Using a Table View Controller |
|
|
395 | (9) |
|
|
404 | (1) |
|
Chapter 15 Customizing Table View Cells |
|
|
405 | (34) |
|
Customizing a Table View Cell in Swift |
|
|
406 | (9) |
|
Designing a Custom Table View Cell |
|
|
415 | (11) |
|
Swipe to Add and Delete a Row |
|
|
426 | (11) |
|
|
437 | (2) |
|
Chapter 16 Using Collection Views |
|
|
439 | (28) |
|
Creating a Collection View |
|
|
439 | (6) |
|
Displaying Data in a Collection View |
|
|
445 | (9) |
|
Displaying Section Headers in a Collection View |
|
|
454 | (12) |
|
|
466 | (1) |
|
Chapter 17 Using the Navigation Controller |
|
|
467 | (44) |
|
Using a Navigation Controller |
|
|
468 | (9) |
|
Passing Data to Other Views |
|
|
477 | (6) |
|
Displaying Multiple Views in a Navigation Controller |
|
|
483 | (9) |
|
Customizing the Navigation Bar |
|
|
492 | (17) |
|
Modifying the Prompt and Title Text |
|
|
492 | (5) |
|
Modifying the Back Button |
|
|
497 | (3) |
|
Modifying the Color of the Navigation Bar |
|
|
500 | (1) |
|
Adding Buttons to a Navigation Bar |
|
|
501 | (8) |
|
|
509 | (2) |
|
Chapter 18 Using Tab Bars and Tool Bars |
|
|
511 | (26) |
|
Switching View Controllers in a Tab Bar Controller |
|
|
514 | (12) |
|
Customizing Tab Bar Icons |
|
|
519 | (6) |
|
Deleting View Controllers from a Tab Bar Controller |
|
|
525 | (1) |
|
|
526 | (8) |
|
Adding and Deleting Tool Bar Buttons |
|
|
530 | (4) |
|
|
534 | (3) |
|
Chapter 19 Using the Page View Controller |
|
|
537 | (18) |
|
Adding and Customizing a Page Controller |
|
|
538 | (2) |
|
|
540 | (4) |
|
Making View Controllers Appear in a Page Controller |
|
|
544 | (9) |
|
|
553 | (2) |
|
Chapter 20 Using the Split View Controller |
|
|
555 | (30) |
|
Understanding the Structure of a Split View Controller |
|
|
558 | (10) |
|
Adding a Split View Controller to a Story-board |
|
|
568 | (15) |
|
|
573 | (1) |
|
Modifying the AppDelegate.swift File |
|
|
574 | (3) |
|
Modifying the DetailViewController.swift File |
|
|
577 | (3) |
|
Modifying the MasterTableViewController.swift File |
|
|
580 | (3) |
|
|
583 | (2) |
|
Appendix: An Introduction to Swift |
|
|
585 | (52) |
|
|
588 | (3) |
|
Storing Different Data Types |
|
|
591 | (4) |
|
Using Optional Data Types |
|
|
595 | (4) |
|
|
599 | (1) |
|
Mathematical and String Operators |
|
|
600 | (3) |
|
|
603 | (1) |
|
|
603 | (2) |
|
|
605 | (1) |
|
|
606 | (2) |
|
|
608 | (3) |
|
|
611 | (1) |
|
|
612 | (1) |
|
|
613 | (1) |
|
|
614 | (1) |
|
|
615 | (3) |
|
|
618 | (1) |
|
|
618 | (3) |
|
|
621 | (2) |
|
Storing Data in Dictionaries |
|
|
623 | (3) |
|
Storing Data in Structures |
|
|
626 | (2) |
|
Classes and Object-Oriented Programming |
|
|
628 | (1) |
|
Understanding Encapsulation |
|
|
629 | (1) |
|
Understanding Inheritance |
|
|
630 | (2) |
|
Understanding Polymorphism |
|
|
632 | (2) |
|
|
634 | (3) |
Index |
|
637 | |