Settings chrome
The chrome (top bar, lock for keep-open, and Settings gear) is driven by
flags on NookConfiguration.topBar. You can replace the leading identity
(label and icon), strip the top bar entirely, or keep the bar while dropping
the gear.
var configuration = NookConfiguration()
// Replace the leading identity. Defaults: title "Home", OpenNook brand mark.configuration.topBar.leadingTitle = { _ in "Today" }configuration.topBar.leadingIcon = "house" // SF Symbol override; nil keeps the brand mark
// Chrome flags.configuration.topBar.showsTopBar = true // false strips top bar + gear + lockconfiguration.topBar.showsSettings = true // false drops the gear (top bar stays)showsTopBar
Section titled “showsTopBar”When false, the chrome shell renders only your home view inside the
expanded surface. No top bar, no gear, no lock. Use this when your view
owns the entire surface.
showsSettings
Section titled “showsSettings”When false, the top bar remains (so the lock and any leading identity are
still visible) but the gear is removed. Use this when you ship without
exposing the framework’s Settings panels.
topBar.leadingTitle / topBar.leadingIcon
Section titled “topBar.leadingTitle / topBar.leadingIcon”The leading cluster is the home glyph plus a label on the home surface. Both
are functions of AppState, so they can follow your product state.
Defaults are "Home" for the title and the OpenNook brand mark for the icon
(leadingIcon is nil). Set leadingIcon to an SF Symbol name, such as
"house", to use your own glyph. Set leadingTitle to return an empty string
if you want a title-only cluster with no icon override.
See also
Section titled “See also”- Theming - replace the built-in
Settings screen with
setSettings(_:), the companion toshowsSettings. - Your first nook - where
the
topBarflags first appear, alongside the otherNookConfigurationknobs.