UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

How to follow this quick start guide

Paul Hudson    @twostraws   

Updated for Xcode 15

This guide is called Understanding Swift, because it focuses on trying to explain why Swift is the way it is – why we have arrays as well as sets, why enums can have associated values, when forcing unwrapping makes sense, and more.

I have literally tried to structure this so that many entries starts with “Why does Swift…” or “When would you…” because this is about answering your questions as effectively as I can.

You’ll see that some chapters have “should” in the title, such as “When should you write throwing functions?” – these are places where I’ve tried to provide some guidance to help you understand scenarios when certain features are useful. My goal here isn’t to tell you how to write your Swift code, but instead to give you some broad guidance that helps you come to your own conclusions. I highly recommend you try things out for yourself, read opinions from myself and others, and decide what works best for your code.

Already got some experience?

If you’ve already had some experience with Swift, I recommend you just jump to whichever chapter interests you and read from there. There’s no need to read in a special order; just dive in and enjoy.

Just starting out?

If you’re just starting with Swift, the best way to read this book is by treating it as a supplement to either my 100 Days of SwiftUI or my 100 Days of Swift. Those courses both start by teaching you the fundamentals of Swift development in a practical way, and will link you back to here so you can get some more explanation as and when you need it.

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

BUY OUR BOOKS
Buy Pro Swift Buy Pro SwiftUI Buy Swift Design Patterns Buy Testing Swift Buy Hacking with iOS Buy Swift Coding Challenges Buy Swift on Sundays Volume One Buy Server-Side Swift Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Advanced iOS Volume Three Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with macOS Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Beyond Code

Was this page useful? Let us know!

Average rating: 4.7/5

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.