Log In
Or create an account -> 
Imperial Library
  • Home
  • About
  • News
  • Upload
  • Forum
  • Help
  • Login/SignUp

Index
Title Page Dedication Acknowledgments Table of Contents Introduction
Learning Swift Why Swift? What About Objective-C? Prerequisites How This Book Is Organized How to Use This Book Challenges and For the More Curious Typographical Conventions Necessary Hardware and Software Using an eBook Before You Begin
I. Getting Started
1. Getting Started
Getting Started with Xcode Playing in a Playground Running Your Code Troubleshooting Playgrounds Varying Variables and Printing to the Console Adding Comments You Are on Your Way! Bronze Challenge
2. Types, Constants, and Variables
Types Constants vs Variables String Interpolation Bronze Challenge
II. The Basics
3. Conditionals
if/else Ternary Operator Nested ifs else if Bronze Challenge
4. Numbers
Integers Creating Integer Instances Operations on Integers
Integer division Operator shorthand Overflow operators
Converting Between Integer Types Floating-Point Numbers Ranges of Numbers Bronze Challenge For the More Curious: Numeric Literals
5. Switch
Switch Syntax
Ranges Value binding where clauses
Tuples and Pattern Matching switch vs if/else Bronze Challenge Silver Challenge
6. Loops
for-in Loops
where
while Loops repeat-while Loops Control Transfer Statements in Loops Silver Challenge
7. Strings
Working with Strings
Characters
Unicode
Unicode scalars Canonical equivalence
Counting elements Indices and ranges
Bronze Challenge Silver Challenge For the More Curious: Substrings For the More Curious: Multiline Strings
III. Collections and Functions
8. Arrays
Creating an Array Accessing and Modifying Arrays Combining Arrays Array Equality Immutable Arrays Documentation Bronze Challenge Silver Challenge
9. Optionals
Optional Types Optional Binding Implicitly Unwrapped Optionals Optional Chaining Modifying an Optional in Place The Nil Coalescing Operator Bronze Challenge Silver Challenge Gold Challenge
10. Dictionaries
Creating a Dictionary Accessing and Modifying Values Adding and Removing Values Looping over a Dictionary Immutable Dictionaries Translating a Dictionary to an Array Silver Challenge Gold Challenge
11. Sets
What Is a Set? Getting a Set Working with Sets
Unions Intersections Disjoint
Moving Between Types Bronze Challenge Silver Challenge
12. Functions
A Basic Function Function Parameters
Parameter names Default parameter values In-out parameters
Returning from a Function Nested Function Definitions and Scope Multiple Returns Optional Return Types Exiting Early from a Function Function Types Bronze Challenge Silver Challenge For the More Curious: Void For the More Curious: Variadic Parameters
13. Closures
Closure Syntax Closure Expression Syntax Functions as Arguments Closures Capture Their Enclosing Scope Functional Programming Higher-Order Functions
map(_:) filter(_:) reduce(_:_:)
Bronze Challenge Silver Challenge Gold Challenge For the More Curious: Functions as Return Types
IV. Enumerations, Structures, and Classes
14. Enumerations
Basic Enumerations Enumerations with Raw Values Methods Associated Values Bronze Challenge Silver Challenge For the More Curious: Recursive Enumerations
15. Structs and Classes
A New Project Structures Instance Methods
Mutating methods
Classes
A Monster class Inheritance
A Zombie subclass Preventing overriding The zombie problem Polymorphism and type casting
Looking Ahead: What Is the Real Difference? Bronze Challenge Silver Challenge For the More Curious: Type Methods
16. Properties
Basic Stored Properties Nested Types Lazy Stored Properties Computed Properties
A getter and a setter
Property Observers Type Properties Access Control
Controlling getter and setter visibility
Bronze Challenge Silver Challenge Gold Challenge For the More Curious: Key Paths
17. Initialization
Initializer Syntax Struct Initialization
Default initializers for structs Custom initializers for structs
Initializer delegation
Class Initialization
Default initializers for classes Initialization and class inheritance
Automatic initializer inheritance Designated initializers for classes Convenience initializers for classes
Required initializers for classes Deinitialization
Failable Initializers
A failable Town initializer
Initialization Going Forward Silver Challenge Gold Challenge For the More Curious: Initializer Parameters
18. Value vs Reference Types
Value Semantics Reference Semantics Constant Value and Reference Types Using Value and Reference Types Together Copying Equality vs Identity What Should I Use? For the More Curious: Copy on Write
V. Advanced Swift
19. Protocols
Formatting a Table of Data Protocols Protocol Conformance Protocol Inheritance Protocols as Types Protocol Composition Mutating Methods Bronze Challenge Silver Challenge Electrum Challenge Gold Challenge
20. Extensions
Extending an Existing Type Extending Your Own Type
Using extensions to add protocol conformance Adding an initializer with an extension Nested types and extensions Extensions with methods
Bronze Challenge Silver Challenge
21. Generics
Generic Data Structures Generic Functions and Methods Type Constraints Associated Types Type Constraints in where Clauses Generic Composition and Opaque Types Bronze Challenge Silver Challenge Gold Challenge For the More Curious: Understanding Optionals
22. Protocol Extensions
Modeling Exercise Extending Exercise Self Types and Type Values Protocol Extension where Clauses Default Implementations with Protocol Extensions Implementation Conflicts Bronze Challenge Silver Challenge Gold Challenge For the More Curious: Polymorphism and Protocol-Oriented Programming
23. Error Handling
Classes of Errors Lexing an Input String Catching Errors Parsing the Token Array Handling Errors by Sticking Your Head in the Sand Swift Error-Handling Philosophy Bronze Challenge Silver Challenge Gold Challenge For the More Curious: Storing Failable Results for Later
24. Memory Management and ARC
Memory Allocation Strong Reference Cycles Breaking Strong Reference Cycles with weak Reference Cycles with Closures Escaping and Non-Escaping Closures Tin Challenge Bronze Challenge Gold Challenge For the More Curious: A Bit of History For the More Curious: Do I Have the Only Reference?
25. Equatable, Comparable, and Hashable
Equatable
Infix operators Buy one method, get another free!
Comparable
Protocol inheritance
Hashable
Custom hashing
Bronze Challenge Silver Challenge Gold Challenge Platinum Challenge For the More Curious: Custom Operators
26. Property Wrappers
Defining a Property Wrapper
Additional configuration
Accessing the Wrapper Itself Projecting Related Values Bronze Challenge Silver Challenge Gold Challenge
VI. Writing Applications
27. Command-Line Utilities
Introduction to the Command Line Building the Word Finder
Loading the words from disk
Retrieving Command-Line Arguments Receiving Input Interactively Running Your App from the Command Line Parsing Command-Line Arguments with ArgumentParser
Adding ArgumentParser to your project Declaring arguments for ArgumentParser to parse
Silver Challenge Gold Challenge
28. iOS and macOS Apps
Getting Started with TahDoodle That is some View Displaying Dynamic Data Accepting User Input
Sharing references to value-type data Interlude: Troubleshooting with property observers
Observing Changes to the Store Saving and Loading User Data Supporting macOS Bronze Challenge Silver Challenge Gold Challenge
29. Conclusion
Where to Go from Here? Shameless Plugs An Invitation to the Community
Index
  • ← Prev
  • Back
  • Next →
  • ← Prev
  • Back
  • Next →

Chief Librarian: Las Zenow <zenow@riseup.net>
Fork the source code from gitlab
.

This is a mirror of the Tor onion service:
http://kx5thpx2olielkihfyo4jgjqfb7zx7wxr3sd4xzt26ochei4m6f7tayd.onion