twostraws/HackingWithSwift

The project source code for Hacking with iOS.

Swift

6,393

104 commits

updated Jun 22, 2025

See the code

README

Hacking with Swift

This is the source code to accompany Hacking with Swift, a free tutorial series that teaches Swift coding for iOS. There is one folder for the classic Hacking with Swift course, which teaches UIKit and SpriteKit, and another folder for the SwiftUI edition.

All SwiftUI projects should be compatible with Xcode 15 and iOS 17. 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 1300 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 @escaping, or try your hand at protocol-oriented development, Pro Swift is for you.

Swift Coding Challenges is an all-new book written from the ground up to put your Swift skills to the test. I've written a variety of coding challenges that start off simple but slowly get harder, and it's down to you to solve them. I outline each problem, provide you with sample input and output, add in some hints in case you hit problems, then provide a sample solution and explain how it works.

Swift

iOS

Example Code

twostraws/HackingWithSwift

The project source code for Hacking with iOS.

Swift

6,393

104 commits

updated Jun 22, 2025

See the code

README

Hacking with Swift

This is the source code to accompany Hacking with Swift, a free tutorial series that teaches Swift coding for iOS. There is one folder for the classic Hacking with Swift course, which teaches UIKit and SpriteKit, and another folder for the SwiftUI edition.

All SwiftUI projects should be compatible with Xcode 15 and iOS 17. 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 1300 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 @escaping, or try your hand at protocol-oriented development, Pro Swift is for you.

Swift Coding Challenges is an all-new book written from the ground up to put your Swift skills to the test. I've written a variety of coding challenges that start off simple but slowly get harder, and it's down to you to solve them. I outline each problem, provide you with sample input and output, add in some hints in case you hit problems, then provide a sample solution and explain how it works.

Swift

iOS

Example Code

Significant stargazers

Jason Rudolph

638 followers · starred Jun 2022

Gibson Fahnestock

340 followers · starred Apr 2016

Christian Klotz

85 followers · starred Feb 2019

12ya

45 followers · starred Apr 2024