LAST CHANCE: Save 50% on all my Swift books and bundles! >>

DAY 45

Project 9, part 3

Today we’re going to complete your knowledge of SwiftUI navigation by looking at the customization options available to us: customizing the navigation bar appearance, placing toolbar buttons in exact locations, and also letting users edit the navigation title.

Of the three, the middle one is the most important because it comes in two variants: we can either force exact positions of buttons, or we can semantic locations that allow SwiftUI to place the buttons where they make sense for the current platform – and also apply extra styling as appropriate.

A Steve Jobs quote I love is, "Some people think design means how it looks. But of course, if you dig deeper, it's really how it works." This is the power of a declarative layout system like SwiftUI: by giving extra information to the system, by describing the role something has, SwiftUI takes care of making it work the correct way automatically – it's much easier than trying to do it all ourselves.

Today you have three topics to work through, where you’ll learn about custom navigation bar appearances, hiding the back button, toolbar placements, , and more.

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 Essential Developer.

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until July 28th.

Click to save your free spot 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.