Your email was sent successfully. Check your inbox.

An error occurred while sending the email. Please try again.

Proceed reservation?

Export
  • 1
    UID:
    b3kat_BV045921290
    Format: 1 Online-Ressource (ix, 397 Seiten)
    ISBN: 9781789138511
    Content: Cover -- Title Page -- Copyright and Credits -- About Packt -- Contributors -- Table of Contents -- Preface -- Chapter 1: Refreshing the Basics -- Classes and structs -- Classes -- Struct -- Enums -- Simple enums -- Adding methods -- Associating values -- Generic enums -- Raw type enums -- Switching the state of light -- Closures, functions, and currying -- Currying -- Using closures as callbacks -- Using weak and unowned -- Protocols -- Declaring a protocol -- Conforming to a protocol -- Conformance at declaration -- Conformance in an extension -- Protocol extensions -- Default implementations -- Tuples, type aliases, and generics -- Tuples -- Declaring tuples -- Destructuring tuples -- Using tuples in functions -- Type aliases -- Generics -- Generic functions -- Generic types -- Generics, protocols, and associated types -- Summary -- Chapter 2: Understanding ARC and Memory Management -- A brief history of reference counting -- The semantics of reference counting -- Retain -- Release -- Assign -- Copying -- Using and misusing manual reference counting -- Memory leaks -- Dangling pointers -- ARC - what is that? -- Value types -- Strong references -- Weak references -- Unowned references -- Memory debugging -- Configuring your project -- Using the memory graph hierarchy tool -- Leaks, cycles, and dangling references -- Leaking with cycles -- A simple leak -- Fixing the leak -- Using weak -- Using unowned -- Dangling references -- Summary -- Chapter 3: Diving into Foundation and the Standard Library -- Swift basic types -- Working with ranges -- Range as Sequence -- Throwing and catching errors -- Container types -- Arrays -- Mutability and operations -- Iterating, mapping, and reducing -- Dictionaries -- Initialization and mutability -- Iterating, mapping, and reducing -- Mastering concurrency with Dispatch -- Tasks and queues
    Content: Synchronization with Dispatch -- Thread safety through serial queues -- Organizing execution with groups and semaphores -- Example of a counting semaphore -- Using groups -- HTTP with URLSession -- Making your first call with URLSession -- Parsing responses with Decodable -- Sending requests with Encodable -- Summary -- Chapter 4: Working with Objective-C in a Mixed Code Base -- Setting up your project -- Importing Objective-C in Swift -- Exposing Swift to Objective-C -- Nullability and optionals in Objective-C -- Using NS_ASSUME_NON_NULL_BEGIN and NS_ASSSUME_NON_NULL_END -- Using nullable, nonnull, _Nullable, and _Nonnull -- Naming, renaming, and refining Objective-C for Swift -- Setting Objective-C names from Swift -- Setting Swift names from Objective-C -- Renaming classes -- Renaming methods and enum cases -- Lightweight generics in Objective-C -- Using typed NSArray* in Objective-C -- Generic classes in Objective-C -- Cocoa design patterns in Swift -- Delegation -- Using delegation -- Implementing delegation -- Lazy initialization -- Summary -- Chapter 5: Creational Patterns -- The singleton pattern -- Using singletons -- Singletons in a nutshell -- The factory method pattern -- Using the factory method pattern -- Advanced usage of the factory method pattern -- Wrapping up -- The abstract factory pattern -- Using the abstract factory pattern -- Going further with factory methods -- Default implementations -- Inheritance -- Protocol extensions -- Checklist for using the factory method pattern -- The builder pattern -- Model building -- Going further: metaprogramming with Sourcery -- The builder pattern in a nutshell -- The prototype pattern -- Leveraging the prototype pattern -- Going further - NSCopying with Sourcery -- Implementing NSCopying automatically -- Implementing mutable objects -- Implementing NSMutableCopying automatically
    Content: The prototype pattern in a nutshell -- Summary -- Chapter 6: Structural Patterns -- The adapter pattern -- Using the adapter pattern -- The basics -- The classes to adapt -- Using classes as adapters -- Leveraging extensions -- The adapter pattern in a nutshell -- The decorator pattern -- Using a decorator -- Going further with decorator -- Decoration in a nutshell -- The facade pattern and proxy pattern -- The facade pattern -- Building a network cache with the facade pattern -- Using the proxy pattern to implement request/response logging -- The composite pattern -- Using the composite pattern to represent tests and suites -- The bridge pattern -- Anatomy of the bridge pattern -- Using the bridge pattern -- The flyweight pattern -- A shopping list using the flyweight pattern -- Summary -- Chapter 7: Behavioral Patterns -- The state pattern -- The card reader -- Using enums -- Refactoring for maintainability -- Extracting a single protocol -- Implementing all states through structs, and moving the logic -- Refactoring the context object -- Using state machines -- The observer pattern -- Event-based programming -- Using NotificationCenter -- Using Key-Value Observing -- Using KVO with existing Objective-C APIs -- Using KVO with Swift -- Observation using pure Swift -- Using observation -- The memento pattern -- Components of the memento pattern -- Implementing the memento pattern -- Using the memento pattern -- The visitor pattern -- Visitable and visitor protocols -- Contributors, thank you notes, and the visitor pattern -- Using visitors -- The strategy pattern -- Components of the strategy pattern -- The ice-cream shop example -- Using the strategy pattern -- Summary -- Chapter 8: Swift-Oriented Patterns -- Getting started with protocol-oriented programming -- A refresher on protocols -- Adding requirements to protocols -- Mutation and value types
    Additional Edition: Erscheint auch als Druck-Ausgabe ISBN 978-1-78913-556-5
    Language: English
    Keywords: Swift ; App ; Modulare Programmierung
    Library Location Call Number Volume/Issue/Year Availability
    BibTip Others were also interested in ...
Close ⊗
This website uses cookies and the analysis tool Matomo. Further information can be found on the KOBV privacy pages