A map of places nearby with a Maps-style sheet that scrolls, snaps and hands off to its list.
A city guide screen: a drawn map with category pins under a detent sheet of nearby places. The sheet has real scroll handoff in both directions, velocity-seeded snapping, background scale and dim at the top detent, and keyboard avoidance for its search field. The sheet ships as `.detentSheet` for your own screens.
$199 once, every piece included. See how installing works · Sign in
SwiftUI source you own, built on Apple frameworks only.
.detentSheet(isPresented:detents:content:) for your own screensTravel (brief). Your agent builds around this screen in the same design.
Travel App (template)
How it behaves, what it handles, and the decisions behind it.
The sheet lives inside your view tree, so the map, feed or canvas behind it keeps receiving touches. It owns the scroll container for its content: dragging moves the sheet until the top detent, then the inner scroll takes over, and pulling down at scroll offset zero moves the sheet again, all within one gesture. Release projects the drag with predictedEndTranslation and snaps to the nearest detent with an interpolating spring seeded by the gesture velocity, with a soft haptic per snap. At the top detent the content behind scales down, gets rounded corners and dims; tapping the dim steps back one detent.
.ignoresSafeArea(.keyboard) so it never shifts.onScrollGeometryChange for the inner offset and ScrollPosition to commit an upward handoff: past the top detent the drag translates the content, and on release that translation is written into the real scroll offset in the same update. On iOS 17 a geometry probe inside the content reports the offset (downward handoff works the same), and dragging past the top rubber-bands the sheet instead of scrolling.selectedDetent to move the sheet programmatically. Dragging below half of the lowest detent dismisses.DetentSheetExample at the end of DetentSheet.swift is the Nearby screen from the preview.Pieces that work well next to this one.