Swift Compact Reference (2.0)-- Allen Holub

Swift Compact Reference

Covers Swift version 2.0 (June, 2015)

Swift Pocket Reference

The Swift Compact Reference is the book I wish I had when I learned Swift. It's a comprehensive overview of Apple's Swift language, presented as a set of annotated code examples, formatted as 4x6 cards. It really is a reference: something to have in front of you as you’re programming to remind you how the language works. I don't expect many people to learn Swift from this book, though if you have a strong background in functional programming and object orientation, and a good understanding of an OO language like Java, C#, or C++, you can indeed do that.

This page is an interactive version of the reference. Scroll through it by clicking on the left or right side of the card, below, or use the index. Use browser bookmarks to return to a specific page.

Buy the eBook! Our searchable .pdf version displays easily on a cell phone or small-form-factor reader (it works fine in iBooks or a Kindle):


Click card left | Click card right

Here's the Table of Contents as a .pdf.

There's more to Swift than syntax.

Our 2-day hands-on Swift class class is the best way to learn how to use Swift effectively. We regularly teach public sessions. Contact us to present in house.

If you'd rather study at your computer, take our Pluralsight class.

Swift Exercises

The exercises for my Pluralsight Class, Swift In Depth, are on github (https://github.com/aholub/SwiftInDepth). The README.TXT file (displayed on that page) contains the assignments, and all the solutions are provided in the repository. You can clone the repository to your own disk, or you can just look at my solutions by navigating to them on the github site.

Please do not redistribute any of this code (but feel free to link to this page). I'll be updating the code as I find the inevitable bug or two. (If you find a bug, get in touch.)