0%

Book Description

Enter the Swift future of iOS and OS X programming

Beginning Swift Programming is your ideal starting point for creating Mac, iPhone, and iPad apps using Apple's new Swift programming language. Written by an experienced Apple developer and trainer, this comprehensive guide explains everything you need to know to jumpstart the creation of your app idea. Coverage includes data types, strings and characters, operators and functions, arrays and dictionaries, control flow, and looping, with expert guidance on classes, objects, class inheritance, closures, protocols, and generics. This succinct — yet complete — overview provides a detailed introduction to the core features of Swift.

Apple developed Swift to address the limitations of Objective-C, and add features found in more complex languages like Python. The results is simpler, cleaner, more expressive code with automatic memory management, functional programming patterns, and more, including built-in features that make Swift apps faster, scalable, and more secure. This book explains it all, helping developers master Apple's new language.

  • Become fluent with syntax that's easier to read and maintain

  • Understand inferred types for cleaner, less mistake-prone code

  • Learn the key features that make Swift more expressive than Objective-C

  • Learn the new optional types in Swift that make your code more resilient

  • Understand the key design patterns in iOS and Mac OS programming using protocols and delegates

  • Learn how to use generics to create highly reusable code

  • Learn the new access controls mechanism in Swift

  • Get up to speed quickly to remain relevant and ahead of the curve.

    Table of Contents

    1. INTRODUCTION
    2. CHAPTER 1 INTRODUCTION TO SWIFT
      1. What Is Swift?
      2. Why Swift Is Important
      3. Setting Up the Environment
      4. Swift Syntax
      5. Summary
    3. CHAPTER 2 DATA TYPES
      1. Basic Data Types
      2. Tuples
      3. Optional Types
      4. Enumerations
      5. Summary
    4. CHAPTER 3 STRINGS AND CHARACTERS
      1. Strings
      2. Common String Functions
      3. Interoperability with NSString
      4. Summary
    5. CHAPTER 4 BASIC OPERATORS
      1. Assignment Operator
      2. Arithmetic Operators
      3. Comparison Operators
      4. Range Operators
      5. Logical Operators
      6. Summary
    6. CHAPTER 5 FUNCTIONS
      1. Defining and Calling a Function
      2. Function Types
      3. Nested Functions
      4. Summary
    7. CHAPTER 6 COLLECTIONS
      1. Arrays
      2. Dictionaries
      3. Copying the Behavior of Arrays and Dictionaries
      4. Summary
    8. CHAPTER 7 CONTROL FLOW AND LOOPING
      1. Flow Control
      2. Looping
      3. Summary
    9. CHAPTER 8 STRUCTURES AND CLASSES
      1. Structures
      2. Classes
      3. Summary
    10. CHAPTER 9 INHERITANCE
      1. Understanding Inheritance
      2. Types of Initializers
      3. Extensions
      4. Access Controls
      5. Summary
    11. CHAPTER 10 CLOSURES
      1. Understanding Closures
      2. Using the Array’s Three Closure Functions
      3. Using Closures in Your Functions
      4. Summary
    12. CHAPTER 11 PROTOCOLS AND DELEGATES
      1. Understanding Protocols
      2. Understanding Delegates
      3. Summary
    13. CHAPTER 12 GENERICS
      1. Understanding Generics
      2. Generic Types
      3. Summary
    14. APPENDIX EXERCISE ANSWERS
    15. TITLEPAGE
    16. COPYRIGHT
    17. DEDICATION
    18. ABOUT THE AUTHOR
    19. ABOUT THE TECHNICAL EDITOR
    20. CREDITS
    21. ACKNOWLEDGMENTS
    22. ADVERT
    23. END USER LICENSE AGREEMENT
    18.225.56.194