Home Page Icon
Home Page
Table of Contents for
Dedication
Close
Dedication
by Scott Gardner
Transitioning to Swift
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Author
About the Technical Reviewer
Acknowledgments
Who This Book Is For
Chapter 1: Getting Started
Installing Xcode
Creating a Playground
Running a REPL
Logging to the Console
Adding Comments
Using Dot Notation
Summary
Chapter 2: Declaring Variables and Constants
Value Types and Reference Types
Named Types and Compound Types
Naming
Mutability
Declaring Type
Defining Type
Declaration Attributes
@, *, and ;
Declaring Values
Writing Numeric Literals
Access Control
Protocol Adoption
nil and Optionals
Syntax Reference
Summary
Chapter 3: Working with Strings and Collections
Working with Strings
Creating Tuples and Collections
Creating Tuples
Creating Arrays
Creating Dictionaries
Mutability
Multidimensional Tuples and Collections
Working with Tuples and Collections
Working with Tuples
Working with Arrays
Working with Dictionaries
Syntax Reference
Summary
Chapter 4: Performing Operations
Basic Operators
Logical Operators
Bitwise Operators
Advanced Operators
Operator Precedence and Associativity
Summary
Chapter 5: Controlling Program Flow
Range Operators
stride() Functions
Control Transfer Statements
Conditional Statements
Iteration and Enumeration
Labels
Summary
Chapter 6: Creating Functions
Methods & Functions
Currying
Overloading
Custom Operators
Blocks and Closure Expressions
Declaration and Type Attributes
Summary
Chapter 7: Constructing Classes, Structures, and Enumerations
Naming Conventions
Classes and Structures
Classes
Structures
Enumerations
Initialization
Class Initialization
Structure Initialization
Enumeration Initilialization
Failable Initializers
Properties
Enumeration Associated Values
Subscripts
Methods
Declaration and Type Attributes
Class Deinitialization
Avoiding Strong Reference Cycles
Singletons
Selection Guidelines
Summary
Chapter 8: Defining and Adopting Protocols
Use Cases
Naming
Defining
Adopting
Type Checking and Casting
Summary
Chapter 9: Subclassing and Extending
Subclassing
Initializer Inheritance
Overriding
Deinitializer Inheritance
Extending
Protocol Adoption Via An Extension
Summary
Chapter 10: Controlling Access
Access Control Compared
Assigning Access Levels
Summary
Chapter 11: Generic Programming
Specific versus Generic
Syntax
Functions and Types
Where Clauses and Protocol Associated Types
Usage Examples
Summary
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Copyright
Next
Next Chapter
Contents at a Glance
To Lori, Charlotte, Betty, and G’Ma
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset