Book Image

Swift Essentials - Second Edition

By : Alex Blewitt
Book Image

Swift Essentials - Second Edition

By: Alex Blewitt

Overview of this book

Swift was considered one of the biggest innovations last year, and certainly with Swift 2 announced at WWDC in 2015, this segment of the developer space will continue to be hot and dominating. This is a fast-paced guide to provide an overview of Swift programming and then walks you through in detail how to write iOS applications. Progress through chapters on custom views, networking, parsing and build a complete application as a Git repository, all by using Swift as the core language
Table of Contents (17 chapters)
Swift Essentials Second Edition
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Playgrounds and documentation


Playgrounds can contain a mix of code and documentation. This allows a set of code, samples, and explanations to be mixed in with the playground itself.

Learning with playgrounds

As playgrounds can contain a mixture of code and documentation, it makes them an ideal format to view annotated code snippets. In fact, Apple's Swift Tour book can be opened as a playground file.

Xcode documentation can be searched by navigating to Help | Documentation and API Reference or by pressing Command + Shift + 0. In the search dialog that is presented, type Swift Tour and then select the first result. The Swift Tour book should be presented in Xcode's help system, as follows:

A link to download and open the documentation as a playground is given in the first section; if this is downloaded, it can be opened in Xcode as a standalone playground. This provides the same information, but it allows the code examples to be dynamic and show the results in the window:

A key advantage of learning...