Screen · Account
SwiftUI Settings Screen Template
A SwiftUI settings screen with a collapsing profile header, grouped rows, toggles and sign out. Each app template also has a profile and settings flow, including the subscription.
A settings home: a parallax profile header that collapses into an inline title, grouped rows with colored icon blocks, haptic toggles, pushed pages, a sign-out row with a confirmation sheet and a version footer, all from a declarative model.
- SwiftUI
- iOS 17.0+
- settings-screen
$199 once, every piece included. See how installing works · Sign in
01
What's included
SwiftUI source you own, built on Apple frameworks only.
- A parallax profile header that collapses into an inline title
- Grouped rows with colored icon blocks, haptic toggles and pushed pages
- Sign out with a confirmation sheet, and a version footer
- Described by one declarative
SettingsModel
In the Build Kit
SwiftPieces Skill (setup), Native (style), Candy (style), Subscription Utility (brief), Language Learning (brief), Onboarding to Paywall (recipe). Your agent builds around this screen in the same design.
Used in
Subscription App (template), Finance App (template), AI Assistant (template), Meditation App (template), Travel App (template), Sleep App (template), Smart Home App (template), Weather App (template), Meal Planner (template), Fitness App (template), Language App (template)
02
Implementation notes
How it behaves, what it handles, and the decisions behind it.
Describe the page as a SettingsModel (profile, sections, rows with stable ids) and the screen does the rest. The profile header moves at half scroll speed, stretches on over-scroll and collapses into an inline avatar-and-name title. Rows sit in grouped surfaces with tinted icon tiles and a press highlight. Toggles tick with a soft haptic; navigation rows push nested pages and picker rows push a single-choice list, both entering with their groups sliding in along the push axis. Sign-out is a red row that confirms in a compact sheet whose button turns into progress while your async signOut runs, and a version footer closes the page.
Notes
- Inside a tab or another
NavigationStack, passwrapsInNavigationStack: false: the screen skips its own stack and pages push onto the enclosing one. The templates embed it this way. - That enclosing stack has to accept the screen's own route values. Bind it to a
NavigationPath, asTabShellScreendoes, or give it no path. A stack bound to an array of your own route type ([AppRoute]) can't append them, so the navigation and picker rows don't push. - Row kinds:
toggle(Binding<Bool>),navigation(SettingsPage, value:),picker(options:selection:),action(() -> Void)andinfo(String). Pages nest freely; routes are resolved by id against the model, so bindings stay live on pushed pages. - The header height is measured, so the collapse point adapts to Dynamic Type and to a hidden plan badge.
- The sheet uses
presentationDetents([.height(340)]), a visible drag indicator and a 32 pt corner radius; dismissal is disabled while signing out. A.warninghaptic plays when it appears. - Reduce Motion drops the slide-in offsets and springs; the collapse still tracks the scroll.
- The navigation title you pass becomes the back-button label on pushed pages; the inline principal title shows the person.
SettingsScreenExampleat the end ofSettingsScreen.swiftis the screen shown in the preview; copy it as a starting point.
Theming
- Reads
SPThemetokens from@Environment(\.spTheme)and requires thedesign-systemitem. Set.environment(\.spTheme, YourTheme())above the screen to re-skin it. - Pages sit on
color.bg, groups onspSurface(.e1)withradius.lg, and text, dividers, the plan badge and the sign-out row usetextPrimary,textSecondary,separator,fillanddanger. Navigation chrome and the picker checkmark useaccent; switches usesuccess. SettingsRow.tintis optional. Pass a color to give a row its own icon tile, or leave itnilfor anaccenttile with anaccentOnglyph.- Presses use
motion.standardandmotion.bouncy, and pushed groups slide in withmotion.hero, which becomes a short fade under Reduce Motion. The parallax header and collapse stay scroll-linked.
03
Keep building
Pieces that work well next to this one.