List of s

Chapter 2. Introduction to Swift playgrounds

Listing 2.1. Convert Int to a Double

Listing 2.2. How many pizza slices per person?

Listing 2.3. Using arrays

Listing 2.4. Using sets

Listing 2.5. Using dictionaries

Listing 2.6. if, else, and while statements

Listing 2.7. for-in loop with range

Listing 2.8. switch statement

Listing 2.9. Function syntax

Listing 2.10. Modify external parameter name

Listing 2.11. Omit external parameter name

Listing 2.12. Default parameter name

Listing 2.13. Pyramid of doom

Listing 2.14. Multiple optional binding

Listing 2.15. The guard statement

Listing 2.16. The guard let statement

Listing 2.17. Merge guard statements

Listing 2.18. The ternary conditional operator

Listing 2.19. The nil coalescing operator

Listing 2.20. Implicitly unwrapped optional

Listing 2.21. Using tuples

Chapter 3. Swift objects

Listing 3.1. Overloading a function with different parameter names

Listing 3.2. Overloading a function with different parameter data types

Listing 3.3. Class inheritance

Listing 3.4. Override method

Listing 3.5. Call super

Listing 3.6. Extending a protocol

Listing 3.7. Changes to reference types

Listing 3.8. Changes to value types

Chapter 4. View controllers, views, and outlets

Listing 4.1. Add label

Chapter 5. User interaction

Listing 5.1. Rotate gesture action

Chapter 6. Adaptive layout

Listing 6.1. Create Visual Format Language constraints

Listing 6.2. Reposition/Resize views when view size transitions

Listing 6.3. viewWillTransition method structure

Listing 6.4. Animate reposition/resize views

Listing 6.5. Reposition/Resize views when view is laid out

Chapter 7. More adaptive layout

Listing 7.1. Landscape constraints

Listing 7.2. Instantiate stack view

Listing 7.3. Set stack view properties

Listing 7.4. Add stack view and constraints

Chapter 10. Collections, searching, sorting, and tab bars

Listing 10.1. Convert BooksManager to singleton

Chapter 11. Local data persistence

Listing 11.1. Delete and update book

Listing 11.2. Create managed object

Listing 11.3. Simple fetch request

Chapter 12. Data persistence in iCloud

Listing 12.1. Retry operation

Listing 12.2. Add notification info to subscription

Chapter 13. Graphics and media

Listing 13.1. Add border and shadow to view layer

Listing 13.2. Add inspectable layer property in UIView extension

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset