ToolbarMinimizationRestoration

The restoration behavior during toolbar minimization.

StructureiOS 27.0+macOS 27.0+tvOS 27.0+watchOS 27.0+visionOS 27.0+ToolbarMinimizationRestoration in SwiftUI

Declaration

React
type ToolbarMinimizationRestoration = 'atScrollEdge' | 'automatic';
Swift
struct ToolbarMinimizationRestoration

Pass a literal, or build one with SwiftUI.ToolbarMinimizationRestoration from import { SwiftUI } from 'swiftui-react-native'.

Type properties

Overview

Use this type with the View.toolbarMinimizationRestoration(_:for:) modifier to control when a minimized toolbar restores. By default the toolbar restores when the user reverses scroll direction; with atScrollEdge, the toolbar instead restores only when the scroll view's content reaches the scroll edge -- appropriate for screens where the bar is mostly chrome that doesn't need to follow the user.

.toolbarMinimizationBehavior(
    .onScrollDown, for: .navigationBar)
.toolbarMinimizationRestoration(
    .atScrollEdge, for: .navigationBar)

From Apple’s SwiftUI documentation. Code samples there are Swift.

Used by

See also

More in Navigation.