100 Days of SwiftUI Day 96

100 Days of SwiftUI – Day 96

We’ve arrived at day 96 of the 100 Days of SwiftUI! Yesterday, we were presented with the final milestone challenge of the course. Today, we’re starting our final project, where we’ll focus on optimizing the usage of the screen real estates of iPads and much more. The project’s name? Snowseeker. Let’s dive in!

Snowseeker introduction

In this project we’re going to create SnowSeeker: an app to let users browse ski resorts around the world, to help them find one suitable for their next holiday.

This will be the first app where we’ll focus on using the extra screen real estate an iPad provides.

Working with two side by side views in SwiftUI

One of the smartest, simplest ways that our apps adapt to varying screen sizes is actually baked right in to NavigationView. We’ve been using that for quite some time now. Paul goes into more detail in his article.

Using alert() and sheet() with optionals

SwiftUI has two ways of creating alerts and sheets, and so far we’ve mostly only used one: a binding to a Boolean that shows the alert or sheet when the Boolean becomes true.

The second option allows us to bind an optional to the alert or sheet, and we used it briefly when presenting map pins.

Using groups as transparent layout containers

SwiftUI’s Group view is commonly used to work around the 10-child view limit, but it also has another important behavior: it acts as a transparent layout container. This means the group doesn’t actually affect our layout at all, but still gives us the ability to add SwiftUI modifiers as needed, or send back multiple views without using @ViewBuilder. In this way, it differs from, for example, a section.

Wrap up

And that’s it for day 96! We’ll continue on with this project for the final days, so stay tuned for that. We can see the finish line coming closer with each line of code that we finish. Let’s go!

Darryl

Hi! My name is Darryl and this is my personal blog where I write about my journey as I learn programming! You'll also find articles about other things that interest me including games, tech and anime.

Post navigation

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

100 Days of SwiftUI – Day 41

100 Days of SwiftUI – Day 78

100 Days of SwiftUI – Day 85

100 Days of SwiftUI – Day 90