In our final technique project for these 100 days, we’ll be looking at how SwiftUI handles layout and geometry. Yes, I realize you might have expected this kind of thing to be covered much earlier, but one of the great things about SwiftUI is that it does so much work for us – that this kind of tutorial appears so late in this series is testament to how good SwiftUI’s standard layout is.
Randall Munroe, author of the xkcd comic, once said “if you really hate someone, teach them to recognize bad kerning.” If you weren’t already aware, kerning is the spacing between letters, and bad kerning is surprisingly common – once you learn to spot it, you realize it’s everywhere.
Today you’re going to look at alignment, and this is another thing that is hard to ignore when you know about it. Sure, it’s easy to spot when one thing is centered and another thing isn’t, but what if two things are aligned to slightly different leading edges? It’s invisible until you know about, but when you start noticing it’s impossible to stop!
Today you have four topics to work through, in which you’ll learn about the rules of layout, alignment, custom guides, and more.
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!
SAVE 50% To celebrate WWDC23, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
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.
Link copied to your pasteboard.