Swift Notes for Professionals book

    Amazing collection of free programming books

    Collecting
    Free
    Amazing collection of free programming books

    The Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow. Text content is released under Creative Commons BY-SA. See credits at the end of this book whom contributed to the various chapters. Images may be copyright of their respective owners unless otherwise specified

    Book created for educational purposes and is not affiliated with group(s), company(s) nor Stack Overflow. All trademarks belong to their respective company owners

    https://goalkicker.com/

    Content

    1-1Content list
    1-2About
    1-3Chapter 1: Getting started with Swift Language
    1-4Section 1.1: Your first Swift program
    1-5Section 1.2: Your first program in Swift on a Mac (using a Playground)
    1-6Section 1.3: Your first program in Swift Playgrounds app on iPad
    1-7Section 1.4: Installing Swift
    1-8Section 1.5: Optional Value and Optional enum
    1-9Chapter 2: Variables & Properties
    1-10Section 2.1: Creating a Variable
    1-11Section 2.2: Property Observers
    1-12Section 2.3: Lazy Stored Properties
    1-13Section 2.4: Property Basics
    1-14Section 2.5: Computed Properties
    1-15Section 2.6: Local and Global Variables
    1-16Section 2.7: Type Properties
    1-17Chapter 3: Numbers
    1-18Section 3.1: Number types and literals
    1-19Section 3.2: Convert numbers to/from strings
    1-20Section 3.3: Rounding
    1-21Section 3.4: Random number generation
    1-22Section 3.5: Convert one numeric type to another
    1-23Section 3.6: Exponentiation
    1-24Chapter 4: Strings and Characters
    1-25Section 4.1: String & Character Literals
    1-26Section 4.2: Concatenate strings
    1-27Section 4.3: String Encoding and Decomposition
    1-28Section 4.4: Examine and compare strings
    1-29Section 4.5: Reversing Strings
    1-30Section 4.6: Check if String contains Characters from a Defined Set
    1-31Section 4.7: String Iteration
    1-32Section 4.8: Splitting a String into an Array
    1-33Section 4.9: Unicode
    1-34Section 4.10: Converting Swift string to a number type
    1-35Section 4.11: Convert String to and from Data / NSData
    1-36Section 4.12: Formatting Strings
    1-37Section 4.13: Uppercase and Lowercase Strings
    1-38Section 4.14: Remove characters from a string not defined in Set
    1-39Section 4.15: Count occurrences of a Character into a String
    1-40Section 4.16: Remove leading and trailing WhiteSpace and NewLine
    1-41Chapter 5: Booleans
    1-42Section 5.1: What is Bool?
    1-43Section 5.2: Booleans and Inline Conditionals
    1-44Section 5.3: Boolean Logical Operators
    1-45Section 5.4: Negate a Bool with the prefix ! operator
    1-46Chapter 6: Arrays
    1-47Section 6.1: Basics of Arrays
    1-48Section 6.2: Extracting values of a given type from an Array with flatMap(_:)
    1-49Section 6.3: Combining an Array's elements with reduce(_:combine:)
    1-50Section 6.4: Flattening the result of an Array transformation with flatMap(_:)
    1-51Section 6.5: Lazily flattening a multidimensional Array with flatten()
    1-52Section 6.6: Filtering out nil from an Array transformation with flatMap(_:)
    1-53Section 6.7: Subscripting an Array with a Range
    1-54Section 6.8: Removing element from an array without knowing it's index
    1-55Section 6.9: Sorting an Array of Strings
    1-56Section 6.10: Accessing indices safely
    1-57Section 6.11: Filtering an Array
    1-58Section 6.12: Transforming the elements of an Array with map(_:)
    1-59Section 6.13: Useful Methods
    1-60Section 6.14: Sorting an Array
    1-61Section 6.15: Finding the minimum or maximum element of an Array
    1-62Section 6.16: Modifying values in an array
    1-63Section 6.17: Comparing 2 Arrays with zip
    1-64Section 6.18: Grouping Array values
    1-65Section 6.19: Value Semantics
    1-66Section 6.20: Accessing Array Values
    1-67Chapter 7: Tuples
    1-68Section 7.1: What are Tuples?
    1-69Section 7.2: Decomposing into individual variables
    1-70Section 7.3: Tuples as the Return Value of Functions
    1-71Section 7.4: Using a typealias to name your tuple type
    1-72Section 7.5: Swapping values
    1-73Section 7.6: Tuples as Case in Switch
    1-74Chapter 8: Enums
    1-75Section 8.1: Basic enumerations
    1-76Section 8.2: Enums with associated values
    1-77Section 8.3: Indirect payloads
    1-78Section 8.4: Raw and Hash values
    1-79Section 8.5: Initializers
    1-80Section 8.6: Enumerations share many features with classes and structures
    1-81Section 8.7: Nested Enumerations
    1-82Chapter 9: Structs
    1-83Section 9.1: Structs are value types
    1-84Section 9.2: Accessing members of struct
    1-85Section 9.3: Basics of Structs
    1-86Section 9.4: Mutating a Struct
    1-87Section 9.5: Structs cannot inherit
    1-88Chapter 10: Sets
    1-89Section 10.1: Declaring Sets
    1-90Section 10.2: Performing operations on sets
    1-91Section 10.3: CountedSet
    1-92Section 10.4: Modifying values in a set
    1-93Section 10.5: Checking whether a set contains a value
    1-94Section 10.6: Adding values of my own type to a Set
    1-95Chapter 11: Dictionaries
    1-96Section 11.1: Declaring Dictionaries
    1-97Section 11.2: Accessing Values
    1-98Section 11.3: Change Value of Dictionary using Key
    1-99Section 11.4: Get all keys in Dictionary
    1-100Section 11.5: Modifying Dictionaries
    1-101Section 11.6: Merge two dictionaries
    1-102Chapter 12: Switch
    1-103Section 12.1: Switch and Optionals
    1-104Section 12.2: Basic Use
    1-105Section 12.3: Matching a Range
    1-106Section 12.4: Partial matching
    1-107Section 12.5: Using the where statement in a switch
    1-108Section 12.6: Matching Multiple Values
    1-109Section 12.7: Switch and Enums
    1-110Section 12.8: Switches and tuples
    1-111Section 12.9: Satisfy one of multiple constraints using switch
    1-112Section 12.10: Matching based on class - great for prepareForSegue
    1-113Section 12.11: Switch fallthroughs
    1-114Chapter 13: Optionals
    1-115Section 13.1: Types of Optionals
    1-116Section 13.2: Unwrapping an Optional
    1-117Section 13.3: Nil Coalescing Operator
    1-118Section 13.4: Optional Chaining
    1-119Section 13.5: Overview - Why Optionals?
    1-120Chapter 14: Conditionals
    1-121Section 14.1: Optional binding and "where" clauses
    1-122Section 14.2: Using Guard
    1-123Section 14.3: Basic conditionals: if-statements
    1-124Section 14.4: Ternary operator
    1-125Section 14.5: Nil-Coalescing Operator
    1-126Chapter 15: Error Handling
    1-127Section 15.1: Error handling basics
    1-128Section 15.2: Catching dierent error types
    1-129Section 15.3: Catch and Switch Pattern for Explicit Error Handling
    1-130Section 15.4: Disabling Error Propagation
    1-131Section 15.5: Create custom Error with localized description
    1-132Chapter 16: Loops
    1-133Section 16.1: For-in loop
    1-134Section 16.2: Repeat-while loop
    1-135Section 16.3: For-in loop with filtering
    1-136Section 16.4: Sequence Type forEach block
    1-137Section 16.5: while loop
    1-138Section 16.6: Breaking a loop
    1-139Chapter 17: Protocols
    1-140Section 17.1: Protocol Basics
    1-141Section 17.2: Delegate pattern
    1-142Section 17.3: Associated type requirements
    1-143Section 17.4: Class-Only Protocols
    1-144Section 17.5: Protocol extension for a specific conforming class
    1-145Section 17.6: Using the RawRepresentable protocol (Extensible Enum)
    1-146Section 17.7: Implementing Hashable protocol
    1-147Chapter 18: Functions
    1-148Section 18.1: Basic Use
    1-149Section 18.2: Functions with Parameters
    1-150Section 18.3: Subscripts
    1-151Section 18.4: Methods
    1-152Section 18.5: Variadic Parameters
    1-153Section 18.6: Operators are Functions
    1-154Section 18.7: Passing and returning functions
    1-155Section 18.8: Function types
    1-156Section 18.9: Inout Parameters
    1-157Section 18.10: Throwing Errors
    1-158Section 18.11: Returning Values
    1-159Section 18.12: Trailing Closure Syntax
    1-160Section 18.13: Functions With Closures
    1-161Chapter 19: Extensions
    1-162Section 19.1: What are Extensions?
    1-163Section 19.2: Variables and functions
    1-164Section 19.3: Initializers in Extensions
    1-165Section 19.4: Subscripts
    1-166Section 19.5: Protocol extensions
    1-167Section 19.6: Restrictions
    1-168Section 19.7: What are extensions and when to use them
    1-169Chapter 20: Classes
    1-170Section 20.1: Defining a Class
    1-171Section 20.2: Properties and Methods
    1-172Section 20.3: Reference Semantics
    1-173Section 20.4: Classes and Multiple Inheritance
    1-174Section 20.5: deinit
    1-175Chapter 21: Type Casting
    1-176Section 21.1: Downcasting
    1-177Section 21.2: Type casting in Swift Language
    1-178Section 21.3: Upcasting
    1-179Section 21.4: Example of using a downcast on a function parameter involving subclassing
    1-180Section 21.5: Casting with switch
    1-181Chapter 22: Generics
    1-182Section 22.1: The Basics of Generics
    1-183Section 22.2: Constraining Generic Placeholder Types
    1-184Section 22.3: Generic Class Examples
    1-185Section 22.4: Using Generics to Simplify Array Functions
    1-186Section 22.5: Advanced Type Constraints
    1-187Section 22.6: Generic Class Inheritance
    1-188Section 22.7: Use generics to enhance type-safety
    1-189Chapter 23: OptionSet
    1-190Section 23.1: OptionSet Protocol
    1-191Chapter 24: Reading & Writing JSON
    1-192Section 24.1: JSON Serialization, Encoding, and Decoding with Apple Foundation and the Swift Standard Library
    1-193Section 24.2: SwiftyJSON
    1-194Section 24.3: Freddy
    1-195Section 24.4: JSON Parsing Swift 3
    1-196Section 24.5: Simple JSON parsing into custom objects
    1-197Section 24.6: Arrow
    1-198Chapter 25: Advanced Operators
    1-199Section 25.1: Bitwise Operators
    1-200Section 25.2: Custom Operators
    1-201Section 25.3: Overflow Operators
    1-202Section 25.4: Commutative Operators
    1-203Section 25.5: Overloading + for Dictionaries
    1-204Section 25.6: Precedence of standard Swift operators
    1-205Chapter 26: Method Swizzling
    1-206Section 26.1: Extending UIViewController and Swizzling viewDidLoad
    1-207Section 26.2: Basics of Swift Swizzling
    1-208Section 26.3: Basics of Swizzling - Objective-C
    1-209Chapter 27: Reflection
    1-210Section 27.1: Basic Usage for Mirror
    1-211Section 27.2: Getting type and names of properties for a class without having to instantiate it
    1-212Chapter 28: Access Control
    1-213Section 28.1: Basic Example using a Struct
    1-214Section 28.2: Subclassing Example
    1-215Section 28.3: Getters and Setters Example
    1-216Chapter 29: Closures
    1-217Section 29.1: Closure basics
    1-218Section 29.2: Syntax variations
    1-219Section 29.3: Passing closures into functions
    1-220Section 29.4: Captures, strong/weak references, and retain cycles
    1-221Section 29.5: Using closures for asynchronous coding
    1-222Section 29.6: Closures and Type Alias
    1-223Chapter 30: Initializers
    1-224Section 30.1: Convenience init
    1-225Section 30.2: Setting default property values
    1-226Section 30.3: Customizing initialization with parameters
    1-227Section 30.4: Throwable Initilizer
    1-228Chapter 31: Associated Objects
    1-229Section 31.1: Property, in a protocol extension, achieved using associated object
    1-230Chapter 32: Concurrency
    1-231Section 32.1: Obtaining a Grand Central Dispatch (GCD) queue
    1-232Section 32.2: Concurrent Loops
    1-233Section 32.3: Running tasks in a Grand Central Dispatch (GCD) queue
    1-234Section 32.4: Running Tasks in an OperationQueue
    1-235Section 32.5: Creating High-Level Operations
    1-236Chapter 33: Getting Started with Protocol Oriented Programming
    1-237Section 33.1: Using protocols as first class types
    1-238Section 33.2: Leveraging Protocol Oriented Programming for Unit Testing
    1-239Chapter 34: Functional Programming in Swift
    1-240Section 34.1: Extracting a list of names from a list of Person(s)
    1-241Section 34.2: Traversing
    1-242Section 34.3: Filtering
    1-243Section 34.4: Using Filter with Structs
    1-244Section 34.5: Projecting
    1-245Chapter 35: Function as first class citizens in Swift
    1-246Section 35.1: Assigning function to a variable
    1-247Section 35.2: Passing function as an argument to another function, thus creating a Higher-Order Function
    1-248Section 35.3: Function as return type from another function
    1-249Chapter 36: Blocks
    1-250Section 36.1: Non-escaping closure
    1-251Section 36.2: Escaping closure
    1-252Chapter 37: The Defer Statement
    1-253Section 37.1: When to use a defer statement
    1-254Section 37.2: When NOT to use a defer statement
    1-255Chapter 38: Style Conventions
    1-256Section 38.1: Fluent Usage
    1-257Section 38.2: Clear Usage
    1-258Section 38.3: Capitalization
    1-259Chapter 39: NSRegularExpression in Swift
    1-260Section 39.1: Extending String to do simple pattern matching
    1-261Section 39.2: Basic Usage
    1-262Section 39.3: Replacing Substrings
    1-263Section 39.4: Special Characters
    1-264Section 39.5: Validation
    1-265Section 39.6: NSRegularExpression for mail validation
    1-266Chapter 40: RxSwift
    1-267Section 40.1: Disposing
    1-268Section 40.2: RxSwift basics
    1-269Section 40.3: Creating observables
    1-270Section 40.4: Bindings
    1-271Section 40.5: RxCocoa and ControlEvents
    1-272Chapter 41: Swift Package Manager
    1-273Section 41.1: Creation and usage of a simple Swift package
    1-274Chapter 42: Working with C and Objective-C
    1-275Section 42.1: Use a module map to import C headers
    1-276Section 42.2: Using Objective-C classes from Swift code
    1-277Section 42.3: Specify a bridging header to swiftc
    1-278Section 42.4: Use the C standard library
    1-279Section 42.5: Fine-grained interoperation between Objective-C and Swift
    1-280Section 42.6: Using Swift classes from Objective-C code
    1-281Chapter 43: Documentation markup
    1-282Section 43.1: Class documentation
    1-283Section 43.2: Documentation styles
    1-284Chapter 44: Typealias
    1-285Section 44.1: typealias for closures with parameters
    1-286Section 44.2: typealias for empty closures
    1-287Section 44.3: typealias for other types
    1-288Chapter 45: Dependency Injection
    1-289Section 45.1: Dependency Injection with View Controllers
    1-290Section 45.2: Dependency Injection Types
    1-291Chapter 46: Caching on disk space
    1-292Section 46.1: Reading
    1-293Section 46.2: Saving
    1-294Chapter 47: Algorithms with Swift
    1-295Section 47.1: Sorting
    1-296Section 47.2: Insertion Sort
    1-297Section 47.3: Selection sort
    1-298Section 47.4: Asymptotic analysis
    1-299Section 47.5: Quick Sort - O(n log n) complexity time
    1-300Section 47.6: Graph, Trie, Stack
    1-301Chapter 48: Swift Advance functions
    1-302Section 48.1: Flatten multidimensional array
    1-303Section 48.2: Introduction with advance functions
    1-304Chapter 49: Completion Handler
    1-305Section 49.1: Completion handler with no input argument
    1-306Section 49.2: Completion handler with input argument
    1-307Chapter 50: Swift HTTP server by Kitura
    1-308Section 50.1: Hello world application
    1-309Chapter 51: Generate UIImage of Initials from String
    1-310Section 51.1: InitialsImageFactory
    1-311Chapter 52: Design Patterns - Creational
    1-312Section 52.1: Singleton
    1-313Section 52.2: Builder Pattern
    1-314Section 52.3: Factory Method
    1-315Section 52.4: Observer
    1-316Section 52.5: Chain of responsibility
    1-317Section 52.6: Iterator
    1-318Chapter 53: Design Patterns - Structural
    1-319Section 53.1: Adapter
    1-320Section 53.2: Facade
    1-321Chapter 54: (Unsafe) Buer Pointers
    1-322Section 54.1: UnsafeMutablePointer
    1-323Section 54.2: Practical Use-Case for Buer Pointers
    1-324Chapter 55: Cryptographic Hashing
    1-325Section 55.1: HMAC with MD5, SHA1, SHA224, SHA256, SHA384, SHA512 (Swift 3)
    1-326Section 55.2: MD2, MD4, MD5, SHA1, SHA224, SHA256, SHA384, SHA512 (Swift 3)
    1-327Chapter 56: AES encryption
    1-328Section 56.1: AES encryption in CBC mode with a random IV (Swift 3.0)
    1-329Section 56.2: AES encryption in CBC mode with a random IV (Swift 2.3)
    1-330Section 56.3: AES encryption in ECB mode with PKCS7 padding
    1-331Chapter 57: PBKDF2 Key Derivation
    1-332Section 57.1: Password Based Key Derivation 2 (Swift 3)
    1-333Section 57.2: Password Based Key Derivation 2 (Swift 2.3)
    1-334Section 57.3: Password Based Key Derivation Calibration (Swift 2.3)
    1-335Section 57.4: Password Based Key Derivation Calibration (Swift 3)
    1-336Chapter 58: Logging in Swift
    1-337Section 58.1: dump
    1-338Section 58.2: Debug Print
    1-339Section 58.3: print() vs dump()
    1-340Section 58.4: print vs NSLog
    1-341Chapter 59: Memory Management
    1-342Section 59.1: Reference Cycles and Weak References
    1-343Section 59.2: Manual Memory Management
    1-344Chapter 60: Performance
    1-345Section 60.1: Allocation Performance
    1-346Credits
    1-347You may also like

    FAQ

    您可以透過手機、平板或是電腦登入 HiSKIO 平台,在【我的學習】>【我的書籍】頁面,選擇想看的電子書。

    Recommendations

    Reviews

    | Collecting

    Sales Plans