GO FURTHER, FASTER: Try the Swift Career Accelerator today! >>

DAY 42

Project 8, part 4


You’ve now finished Moonshot, which is the first of our projects that started to get difficult – it took longer to explain, we used custom SwiftUI layouts, and I even snuck in a few advanced Swift features. Not all our future projects are going to be difficult, but it’s certainly going to be the case that they are more complex; there is more to them, which means the resulting apps are more interesting, and also more representative of real-world app building.

As the complexity rises so do the odds of making mistakes, and Swift is pretty unforgiving here – as you will undoubtedly have seen by now, even one small mistake on line 20 can result in a random error appearing on line 5, and this can be disheartening.

Well, I hope today’s quote will inspire you. I’ve chosen it specially for today for reasons best left to the reader, but it’s this: don’t panic! These sorts of problems are common, and the easiest way to solve them right now is to comment out whatever code you most recently added, and keep doing so until your code works. You can then slowly re-introduce code until you find the part that causes your compile to break, then fix it.

So, don’t panic – you can do this!

Today you should work through the wrap up chapter for project 8, complete its review, then work through all three of its challenges.

How can this day be improved?

Great job on finishing another day! If you still have questions about what you learned, please send them in using this form – I'll do my best to address the most common problems in the next course update. Thank you!

Now share your progress…

If you use Twitter, the button below will prepare a tweet saying you completed today, along with a celebratory graphic, the URL to this page, and the challenge hashtag. Don't worry – it won't be sent until you confirm on Twitter!

Alternatively, copy and paste the text below to your preferred social network - I'm @twostraws on Mastodon.social, Bluesky, and Threads.

🎉 I just finished Day 42 of the #100DaysOfSwiftUI at https://www.hackingwithswift.com/100/swiftui/42 via @twostraws

Need help? Tweet me @twostraws!

 

Hacking with Swift is sponsored by Alex.

SPONSORED Alex is the iOS & Mac developer’s ultimate AI assistant. It integrates with Xcode, offering a best-in-class Swift coding agent. Generate modern SwiftUI from images. Fast-apply suggestions from Claude 3.5 Sonnet, o3-mini, and DeepSeek R1. Autofix Swift 6 errors and warnings. And so much more. Start your 7-day free trial today!

Try for free!

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

100 Days of SwiftUI


The 100 Days of SwiftUI is a free collection of videos, tutorials, tests, and more to help you learn SwiftUI faster. Click here to learn more, or watch the video below.

Back to 100 Days of SwiftUI

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.