Polishing designs with fonts and colors - a free SwiftUI by Example tutorial
We’ll add some more to our design in just a moment, but first let’s pause and make what we have look better. In ItemRow.swift, our menu item’s name is clearly the most important thing in each row, but it has the same font size as the price below. We can bring it up in size and weight by using the font() modifier, which accepts any of Apple’s Dynamic Type sizes. So, something like this will make it stand out: As for the picture, it looks OK as it is, but with a little love it would look better. For example, we could apply a clipShape() modifier and ask it to be clipped to a circle shape: Or we could apply a clipShape() modifier, then add an overlay() modifier so we place a shape on top of our image. For example, this will add a circle over the image, then give that circle a 2-point gray border: OK, that’s enough styling – let’s look at something more complex. If you look in menu.json you’ll see that each menu item has a string array of restrictions: “G” for containing gluten, “N” for co
Polishing designs with fonts and colors - a free SwiftUI by Example tutorial WWDC26: Save 50% on my books and bundles! >> < Composing views to create a list row Displaying a detail screen with NavigationLink > Polishing designs with fonts and colors Paul Hudson @twostraws June 16th 2023 Updated for Xcode 16.4 We’ll add some more to our design in just a moment, but first let’s pause and make what we have look better. In ItemRow.swift, our menu item’s name is clearly the most important thing in each row, but it has the same font size as the price below. We can bring it up in size and weight by u
Explore this link on the map →related reading
- Building a menu using List - a free SwiftUI by Example tutorialhackingwithswift.com
- Composing views to create a list row - a free SwiftUI by Example tutorialhackingwithswift.com
- SwiftUI by Example - free quick start tutorials for Swift developershackingwithswift.com
- Say precisely what you mean.index.how
- Displaying a detail screen with NavigationLink - a free SwiftUI by Example tutorialhackingwithswift.com
- It’s hard to justify Tahoe icons @ tonsky.metonsky.me
- Layout | Apple Developer Documentationdeveloper.apple.com
- Impeccable: The missing upgrade to Anthropic's impeccable skillimpeccable.style
- allowsHitTesting(_:) | Apple Developer Documentationdeveloper.apple.com
- Using stacks to arrange views | Apple Developer Documentationdeveloper.apple.com
- Color | Apple Developer Documentationdeveloper.apple.com
- Reducing view modifier maintenance | Apple Developer Documentationdeveloper.apple.com