A pattern I use a lot in Personal Best is to pin a card to the bottom of the screen containing a summary plus a call to action. Here’s a simple example: This is easily achieved using SwiftUI’s safeAreaInset: List(0..<100) { i in Text("Row \(i)") } .safeAreaInset(edge: .bottom) { VStack { Text("Some summary content") Button(action: {}) { Spacer() Text("Save") Spacer() } .buttonStyle(.borderedProminent) } .frame(maxWidth: .infinity) .padding() .background(.background) } Recently I’ve been evolving PB’s design and one way I’m doing that is by adding a slight inset to these cards, so they float above the content. I feel like it fits in more with iOS 26’s look and feel. Insetting the card Insetting the card is easily done by adding some extra styles like padding and corner radius: // same code as the prior example, plus the below modifiers .cornerRadius(20) .overlay(RoundedRectangle(cornerRadius: 20).stroke(.gray.opacity(0.25), lineWidth: 1)) .shadow(color: .black.opacity(0.1), radius: 5)…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.