NEW: Start my new Ultimate Portfolio App course with a free Hacking with Swift+ trial! >>

DAY 41

Project 8, part 3


Today we’re going to be completing our Moonshot app by adding two more views plus navigation between them, but here is where you’ll start to see what it takes to create custom layouts in SwiftUI – we’ll be using GeometryReader to get the view size, layoutPriority() to help guide SwiftUI’s layout engine, and more.

Along the way, we’re also going to be tackling one of the common problems you’ll face as programmer: when you have two pieces of separate data that need to be merged somehow. For us, that’s our astronaut and mission data, but the concept is transferrable enough as you’ll see.

At one point in today’s topics I encourage you to stop and play around with the design. I’m sure some folks will skip over this wanting to rush towards the end, but I hope you don’t. As the astronaut John Glenn said, “I suppose the quality in an astronaut more powerful than any other is curiosity – they have to get to some place nobody’s ever been.”

Be curious – take the time to explore your skills and it will pay off!

Today you have three topics to work through, in which you’ll work with GeometryReader, ScrollView, layoutPriority(), and more.

That’s another complete app built – make sure and share your progress to let others know how you’re getting on!

Need help? Tweet me @twostraws!

 

Hacking with Swift is sponsored by Fernando Olivares

SPONSORED Would you describe yourself as knowledgeable, but struggling when you have to come up with your own code? Fernando Olivares has a new book containing iOS rules you can immediately apply to your coding habits to see dramatic improvements, while also teaching applied programming fundamentals seen in refactored code from published apps.

Try the book!

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.