Swift 4 recipes : hundreds of useful hand-picked code snippets /
Get the most out of Swift 4 with this carefully compiled collection of select code snippets designed to solve everyday coding problems. This book features the Apress easy-to-use recipe format, with step-by-step instructions, and a no-fuss approach. You'll explore a wide range of topics, all nea...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
[New York, NY] :
Apress,
[2019]
|
Temas: | |
Acceso en línea: | Texto completo (Requiere registro previo con correo institucional) |
Tabla de Contenidos:
- Intro; Table of Contents; About the Author; About the Technical Reviewer; Acknowledgments; Part I: Beginner; Chapter 1: Introduction; 1-1. Getting Familiar with Swift; Problem; Solution; How It Works; Executing It; Compiling It; 1-2. Scripting in Swift; Problem; Solution; How It Works; 1-3. Summary; Chapter 2: Basics; 2-1. Create a Hello World; Problem; Solution; How It Works; 2-2. Declare variables; Problem; Solution; How It Works; 2-3. Declare constants; Problem; Solution; How It works; 2-4. Declare multiple variables; Problem; Solution; How It Works
- 2-5. Declare Unicode constants and variablesProblem; Solution; How It Works; 2-6. Declare a range; Problem; Solution; How It Works; 2-7. Define an enumeration type; Problem; Solution; How It Works; 2-8. Define a type alias; Problem; Solution; How It Works; 2-9. Use semicolons; Problem; Solution; How It Works; 2-10. Use comments; Problem; Solution; How It Works; 2-11. Summary; Chapter 3: Conditionals; 3-1. Write an if statement; Problem; Solution; How It Works; 3-2. Write an if/else statement; Problem; Solution; How It Works; 3-3. Write multiple if/else/if statements; Problem; Solution
- How It Works3-4. Write a switch statement; Problem; Solution; How It Works; 3-5. Write a switch statement with intervals; Problem; Solution; How It Works; 3-6. Write a switch statement with enumeration values; Problem; Solution; How It Works; 3-7. Write a switch statement with compound cases; Problem; Solution; How It Works; 3-8. Write a switch statement with tuples; Problem; Solution; How It Works; 3-9. Write a switch statement with value bindings; Problem; Solution; How It Works; 3-10. Use the ternary conditional operator; Problem; Solution; How It Works
- 3-11. Use the nil coalescing operatorProblem; Solution; How It Works; 3-12. Use the logical and operator; Problem; Solution; How It Works; 3-13. Use the logical not operator; Problem; Solution; How It Works; 3-14. Use the logical or operator; Problem; Solution; How It Works; 3-15. Use the logical xor operator; Problem; Solution; How It Works; 3-16. Summary; Chapter 4: Loops; 4-1. Write a for loop; Problem; Solution; How It Works; 4-2. Write a while loop; Problem; Solution; How It Works; 4-3. Write a repeat-while loop; Problem; Solution; How It Works; 4-4. Summary; Chapter 5: Functions
- 5-1. Define and call a functionProblem; Solution; How It Works; 5-2. Define and call a function with arguments; Problem; Solution; How It Works; 5-3. Define and call a function with argument labels; Problem; Solution; How It Works; 5-4. Define and call a function without argument labels; Problem; Solution; How It Works; 5-5. Define and call a function with default parameter values; Problem; Solution; How It Works; 5-6. Define and call a function with return value; Problem; Solution; How It Works; 5-7. Define and call a function with multiple return values; Problem; Solution; How It Works