This is the source code to accompany Hacking with Swift, a free tutorial series that teaches Swift coding for iOS.
All projects should be compatible with Xcode 7.3 and iOS 9. Where appropriate, separate project files have been provided so that you can follow the tutorial from scratch without having to dig around in the completed project folder.
If you have questions, you can find me on Twitter @twostraws.
The Hacking with Swift book contains over 1200 pages of tutorials and example code, and makes a great addition to any developer's collection. Thank you to everyone who bought the book – your purchase helps me create more great Swift content in the future!
Pro Swift is the sequel to Hacking with Swift, and includes a 250-page guide to helping you write faster, more efficient Swift, accompanied by over 70 videos demonstrating each technique. If you want to dive into functional programming, learn more about MVVM, get to grips with @autoclosure and @noescape, or try your hand at protocol-oriented development, Pro Swift is for you.
If you're looking to complete your iOS knowledge, Objective-C for Swift Developers is a book that's designed to teach you Objective-C as fast as possible by drawing parallels between it and Swift. It also includes a video walkthrough where I recreate a Hacking with Swift project in Objective-C, so you can see exactly how both languages compare.
- What's new in Swift 2.2? (includes video)
- What's new in Swift 2? (includes video)
- What's new in iOS 9?
- Free Swift example code
New features of Swift 2.0 in depth:
- Error handling in Swift 2: try, catch, do and throw
- The guard keyword in Swift 2: early returns made easy
- The defer keyword in Swift 2: try/finally done right
- Availability checking in Swift 2: backwards compatibility the smart way
I've also written some other free tutorials you might enjoy: