Swift Notes for Professionals book

    Amazing collection of free programming books

    收集中
    免费
    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/

    章节目录

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

    常见问答

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

    猜你喜欢

    用户评价

    | 收集中

    销售方案