NEW: My new book Pro SwiftUI is out now – level up your SwiftUI skills today! >>

DAY 36

Project 7, part 1


Linus Torvalds, the creator of the open source Linux operating system, was once asked if he had any advice for developers who wanted to build a large software project. Here is the response he gave:

Nobody should start to undertake a large project. You start with a small trivial project, and you should never expect it to get large. If you do, you'll just overdesign and generally think it is more important than it likely is at that stage. Or worse, you might be scared away by the sheer size of the work you envision.

In writing this course, I’ve already had people emailing me asking “why didn’t I use X to solve a problem in project 1?” or “Y would have been much better than Z in project 4.” They are probably right, but if I tried to teach you everything in project 1 you’d have found it overwhelming and unpleasant, so instead we built a small app. Then in project 2 we built a second small app. Then we built a third and a fourth, with each one adding to your skills.

Today you’ll start project 7, which is still most definitely a small app. However, in the process you’ll learn how to show another screen, how to share data across screens, how to load and save user data, and more – the kinds of features that really help take your SwiftUI skills to the next level.

That doesn’t mean the app is perfect – as you’ll learn later, UserDefaults isn’t the ideal choice for what we’re doing here, and instead something like the much bigger and more complex Core Data would be a better fit – but that’s okay. Remember, we’re setting out to build something small and work our way up, rather than just jumping into one all-encompassing mega-project.

If you’re all set, let’s get to it!

Today you have seven topics to work through, in which you’ll learn about @StateObject, sheet(), onDelete(), and more.

Tip: It’s easy to feel overwhelmed by the various property wrappers used in SwiftUI, so you might find this article helpful: Which SwiftUI property wrapper to choose in any situation.

Don’t forget to post your progress somewhere online – we’re well past a third of the way through the course, and you’re doing great!

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!

Need help? Tweet me @twostraws!

 

Hacking with Swift is sponsored by MadMachine

SPONSORED Want to try Swift on microcontrollers? MadMachine provides ways to interact with the physical world in a Swift way. Join us and have fun!

Get it now

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.