Cargando…

Learning Swift : build a solid foundation in Swift to develop smart and robust iOS and OS X applications /

If you are looking to build iOS or OS X apps using the most modern technology, this book is ideal for you. You will find this book especially useful if you are new to programming or if you have yet to develop for iOS or OS X.

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Wagner, Andrew J. (Autor)
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham, UK : Packt Publishing, 2015.
Colección:Community experience distilled.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Copyright; Credits; About the Author; About the Reviewer; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Introducing Swift; Defining our goals for this book; Setting up the development environment; Running our first Swift code; Understanding playgrounds; Learning with this book; Summary; Chapter 2: Building Blocks
  • Variables, Collections, and Flow Control; Core Swift types; Constants and variables; Containers; Tuples; Arrays; Dictionaries; Swift's type system; Printing to the console; Control flow; Conditionals; Switches; Loops; Functions; Basic functions
  • Parameterized functionsFunctions that return values; Functions with default arguments; Bringing it all together; Summary; Chapter 3: One Piece at a Time
  • Types, Scopes, and Projects; Structs; Types versus instances; Properties; Member and static methods; Computed properties; Reacting to property changes; Subscripts; Custom initialization; Classes; Inheriting from another class; Initialization; Overriding initializers; Required initializers; Designated and convenience initializers; Overriding methods and computed properties; Methods; Computed properties; Casting; Upcasting; Downcasting
  • EnumerationsBasic declaration; Testing enumeration values; Raw values; Associated values; Methods and properties; Projects; Setting up a command-line Xcode project; Creating and using an external file; Interfacing with code from other files; File organization and navigation; Extensions; Scope; How is scope defined; Nested types; Access control; Summary; Chapter 4: To Be or Not to Be
  • Optionals; Introducing optionals; Unwrapping an optional; Optional binding; Forced unwrapping; Nil coalescing; Optional chaining; Implicitly unwrapped optionals; Debugging optionals
  • The underlying implementationSummary; Chapter 5: A Modern Paradigm
  • Closures and Functional Programming; Functional programming philosophy; State and side effects; Declarative versus imperative code; Closures; Closures as variables; Closures as parameters; Syntactic sugar; Building blocks of functional programming in Swift; The filter function; The reduce function; The map function; The sorted function; How these affect the state and nature of code; Lazy evaluation; Curried functions; Summary; Chapter 6: Make Swift Work for You
  • Protocols and Generics; Protocols; Defining a protocol
  • Implementing a protocolUsing type aliases; Defining a generic; The generic function; The generic type; Type constraints; Protocol constraints; Where clauses for protocols; Where clauses for equality; Extending the existing generics; Enhancing arrays; Enhancing dictionaries; Putting protocols and generics to use; Generators; Sequences; Product of Fibonacci numbers under 50; Summary; Chapter 7: Everything is Connected
  • Memory Management; How data is stored on a computer; Filesystem; Memory; Value types versus reference types; Determining if a value or reference type; Behavior on assignment