Learning Swift

 
 
Packt Publishing Limited
  • 1. Auflage
  • |
  • erschienen am 30. Juni 2015
  • |
  • 266 Seiten
 
E-Book | ePUB mit Adobe DRM | Systemvoraussetzungen
978-1-78439-962-7 (ISBN)
 
Swift is Apple's new programming language and the future of iOS and OS X app development. At its surface, Swift is easy to jump into, but it has complex elements that are critical to becoming proficient at turning an idea into reality.Develop the skills and confidence to dive passionately into creating compelling, maintainable, and elegant apps in Swift. This book provides an approachable, step-by-step introduction into programming with Swift. Each topic is separated into comprehensive sections that are full of practical examples and easy-to-understand explanations. Each section builds on the previous topics to develop a comprehensive understanding of app development in Swift.It begins by giving an overview of the key features with practical examples and progresses to more advanced topics that help differentiate the skillful developers from the mediocre ones. It covers topics, such as variables, optionals, closures, generics, and memory management. In addition, this book also covers the art of programming, such as maintainability, useful design patterns, and resources for furthering your knowledge. This all culminates in writing a basic iOS app that will get you well on your way to turning your own app ideas into a reality.
  • Englisch
  • Birmingham
  • |
  • Großbritannien
978-1-78439-962-7 (9781784399627)
1784399620 (1784399620)
weitere Ausgaben werden ermittelt
Andrew J Wagner is an independent software developer who concentrates on iOS development and backend web services and has a degree in computer engineering from Rensselaer Polytechnic Institute, New York. He has also been developing his own iOS apps through his company, Learn Brigade LLC, since 2008 and has experience working with and for large-scale companies and small-scale companies. He is passionate about using computers as a creative outlet and writing software that is beautiful in implementation, functionality, and experience.
  • 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 functions
  • Functions 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
  • Enumerations
  • Basic 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 implementation
  • Summary
  • 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 protocol
  • Using 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
  • Behavior on input
  • Capture behavior of Closure
  • Automatic reference counting
  • Object relationships
  • Strong relationships
  • Weak relationships
  • Unowned relationships
  • Strong reference cycles
  • Strong reference cycles between objects
  • Spotting
  • Fixing the cycles
  • With closures
  • Spotting
  • Fixing
  • Lost objects
  • Between objects
  • With closures
  • Summary
  • Chapter 8: Writing Code the Swift Way - Design Patterns and Techniques
  • What is a design pattern?
  • Behavioral patterns
  • The iterator pattern
  • The observer pattern
  • The callback property
  • The notification center
  • Structural patterns
  • The composite pattern
  • Hierarchies
  • An alternative to subclassing
  • The delegate pattern
  • Model view controller
  • Creational patterns
  • Singleton/shared instance
  • The abstract factory pattern
  • Using associated values effectively
  • Replacing class hierarchies
  • Concisely representing a state
  • Extending system types to reduce code
  • Lazy properties
  • Avoiding unnecessary memory usage
  • Avoiding unnecessary processing
  • Localizing logic to the concerned property
  • Summary
  • Chapter 9: Harnessing the Past - Understanding and Translating Objective-C
  • Swift's relationship with Objective-C
  • The history of Objective-C
  • Constants and variables
  • Value types
  • Reference types
  • Containers
  • Arrays
  • Dictionaries
  • Control flow
  • Conditionals
  • Switches
  • Loops
  • Functions
  • Types
  • Structures
  • Enumerations
  • Classes
  • The basic class
  • Initializers
  • Properties
  • Methods
  • Inheritance
  • Categories
  • Protocols
  • Blocks
  • Projects
  • Header files
  • An implementation file
  • Organization
  • Calling Objective-C code from Swift
  • A bridging header
  • Using functions
  • Using types
  • Containers
  • Reference type translation
  • Summary
  • Chapter 10: A Whole New World - Developing an App
  • Conceptualizing the app
  • Features
  • The interface
  • Data
  • Setting up the app project
  • Configuring the user interface
  • Running the app
  • Allowing picture taking
  • Temporarily saving a photo
  • Populating our photo grid
  • Refactoring to respect Model-View-Controller
  • Permanently saving a photo
  • Summary
  • Chapter 11: What's Next? Resources, Advice, and Next Steps
  • Apple's documentation
  • Forums and blogs
  • Blog posts
  • Forums
  • Prominent figures
  • Podcasts
  • Summary
  • Index

Dateiformat: EPUB
Kopierschutz: Adobe-DRM (Digital Rights Management)

Systemvoraussetzungen:

Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat EPUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Weitere Informationen finden Sie in unserer E-Book Hilfe.


Download (sofort verfügbar)

37,41 €
inkl. 19% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe DRM
siehe Systemvoraussetzungen
E-Book bestellen

Unsere Web-Seiten verwenden Cookies. Mit der Nutzung dieser Web-Seiten erklären Sie sich damit einverstanden. Mehr Informationen finden Sie in unserem Datenschutzhinweis. Ok