Cargando…

Object-oriented programming with Swift 2 : get to grips with object-oriented programming with Swift to efficiently build powerful real-world applications /

Annotation

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Hillar, Gastón C. (Gastón Carlos) (Autor)
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham, UK : Packt Publishing, 2016.
Colección:Community experience distilled.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover ; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Objects from the Real World to the Playground; Installing the required software; Capturing objects from the real world; Generating classes to create objects; Recognizing variables and constants to create properties; Recognizing actions to create methods; Organizing classes with UML diagrams; Working with API objects in the Xcode Playground; Exercises; Test your knowledge; Summary; Chapter 2 : Structures, Classes, and Instances
  • Understanding structures, classes, and instancesUnderstanding initialization and its customization; Understanding deinitialization and its customization; Understanding automatic reference counting; Declaring classes; Customizing initialization; Customizing deinitialization; Creating the instances of classes; Exercises; Test your knowledge; Summary; Chapter 3 : Encapsulation of Data with Properties; Understanding the elements that compose a class; Declaring stored properties; Generating computed properties with setters and getters; Combining setters, getters, and a related property
  • Understanding property observersTransforming values with setters and getters; Using type properties to create values shared by all the instances of a class; Creating mutable classes; Building immutable classes; Exercises; Test your knowledge; Summary; Chapter 4 : Inheritance, Abstraction, and Specialization; Creating class hierarchies to abstract and specialize behavior; Understanding inheritance; Declaring classes that inherit from another class; Overriding and overloading methods; Overriding properties; Controlling whether subclasses can or cannot override members
  • Working with typecasting and polymorphismTaking advantage of operator overloading; Declaring operator functions for specific subclasses; Exercises; Test your knowledge; Summary; Chapter 5 : Contract Programming with Protocols; Understanding how protocols work in combination with classes; Declaring protocols; Declaring classes that adopt protocols; Taking advantage of the multiple inheritance of protocols; Combining inheritance and protocols; Working with methods that receive protocols as arguments; Downcasting with protocols and classes
  • Treating instances of a protocol type as a different subclassSpecifying requirements for properties; Specifying requirements for methods; Combining class inheritance with protocol inheritance; Exercises; Test your knowledge; Summary; Chapter 6 : Maximization of Code Reuse with Generic Code; Understanding parametric polymorphism and generic code; Declaring a protocol to be used as a constraint; Declaring a class that conforms to multiple protocols; Declaring subclasses that inherit the conformance to protocols; Declaring a class that works with a constrained generic type