Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
About This eBook
Title Page
Copyright Page
Contents at a Glance
Table of Contents
About the Author
Dedication
Acknowledgments
We Want to Hear from You!
Reader Services
Introduction
Who Should Read This Book?
What Should You Expect from This Book?
Hour 1. Introducing the Swift Development Environment
What Is Swift?
Getting Started
Summary
Q&A
Workshop
Exercise
Hour 2. Learning Swift’s Fundamental Data Types
Constants in Swift
Variables in Swift
Introducing Data Types
Summary
Q&A
Workshop
Exercise
Hour 3. Using Operators in Swift
Unary Operators
Binary Operators
Ternary Conditional Operators
Summary
Q&A
Workshop
Exercise
Hour 4. Working with Collection Types
Arrays
Dictionaries
Tuples
Summary
Q&A
Workshop
Exercise
Hour 5. Understanding Optional Values
What Are Optional Values?
How to Designate a Variable as Optional
Wrapping and Unwrapping Optional Variables
Use Case for Optionals
Summary
Q&A
Workshop
Exercise
Hour 6. Controlling Program Flow with Conditionals
The if Statement
The switch Statement
Summary
Q&A
Workshop
Exercise
Hour 7. Iterating Code with Loops
Two Categories of Loops
Transferring Control in Loops
Summary
Q&A
Workshop
Exercise
Hour 8. Using Functions to Perform Actions
The Nature of Functions in Swift
General Function Syntax and Structure
Functions with No Parameters and No Return Type
The Type of a Function
Functions with Parameters
Functions with Variadic Parameters
Functions with Return Types
External Parameter Names
Default Parameter Values
Change Argument Values with In-Out Parameters
Summary
Q&A
Workshop
Exercise
Hour 9. Understanding Higher Order Functions and Closures
Higher Order Functions
Closures
Summary
Q&A
Workshop
Exercise
Hour 10. Learning About Structs and Classes
Overview of Structs and Classes in Swift
What Swift Structs and Classes Have in Common
Differences Between Structs and Classes
When to Use a Class or a Struct
Summary
Q&A
Workshop
Exercise
Hour 11. Implementing Class Inheritance
What Is Inheritance?
Identifying a Base Class
Creating a Subclass
Overriding Inherited Methods
Accessing super
Preventing Overrides
Class Identity
Summary
Q&A
Workshop
Exercise
Hour 12. Harnessing the Power of Enums
Understanding Swift Enums
Swift Enum Structure
Raw Values
Enum Shorthand Syntax
Associated Values
Switching Enum Values
Adding Instance Methods to Enums
Summary
Q&A
Workshop
Exercise
Hour 13. Customizing Initializers of Classes, Structs, and Enums
Initialization
Initializing Value Types
Advanced Initialization
Summary
Q&A
Workshop
Exercise
Hour 14. Digging Deeper with Properties
Stored Properties
Computed Properties
Property Accessors
Property Observers
Inheriting and Overriding Accessors
Inheriting and Overriding Observers
Summary
Q&A
Workshop
Exercise
Hour 15. Adding Advanced Type Functionality
Type Properties and Methods
Type Aliasing
Type Access Control
Subscripts
Type Casting and Non-Specific Types
Summary
Q&A
Workshop
Exercise
Hour 16. Understanding Memory Allocation and References
Deinitialization
Automatic Reference Counting
Summary
Q&A
Workshop
Exercise
Hour 17. Using Protocols to Define Behavior
Defining Protocols
Creating and Adopting Protocols
Properties
Defining Methods in Protocols
Using Protocol Names as Types
Adopting and Inheriting Multiple Protocols
Optional Protocol Properties and Methods
How to Check for Protocol Conformance
Using Protocols for Delegation
Summary
Q&A
Workshop
Exercise
Hour 18. Using Extensions to Add Type Functionality
Defining Extensions
Adding Functionality with Extensions
Summary
Q&A
Workshop
Exercise
Hour 19. Working with Optional Chaining
Defining Optional Chaining
Chaining Optional Properties
Subscripts
Methods
Summary
Q&A
Workshop
Exercise
Hour 20. Introducing Generics
An Introduction to Generics
Type Parameters and Placeholder Types
Specifying Type Constraints
Creating Generic Types
Extending Generic Types
Using Associated Types in Protocols
Summary
Q&A
Workshop
Exercise
Hour 21. Adding Interoperability with Objective-C
Objective-C Basics
Bridging
Integrating Swift into an Objective-C App
Summary
Q&A
Workshop
Exercise
Hour 22. Interacting with User Interfaces
Interface Introduction
Interface Definitions
Building an Interface
Creating Your Own Project
Adding UI Elements
Summary
Q&A
Workshop
Exercise
Hour 23. Asynchronous Programming in Swift
The Problem That Concurrency Solves
Different Types of Queues
Asynchronous Programming in Action
Add iTunes Search to Songs App
Parsing JSON
Summary
Q&A
Workshop
Exercise
Hour 24. Learning Swift’s Standard Library Functions
What Is a Standard Library?
Numeric Types
String Type
Protocols
Functional Functions
Global Functions
Summary
Q&A
Workshop
Exercise
Index
Code Snippets
← Prev
Back
Next →
← Prev
Back
Next →