BackNavigationModifier
@MainActor
public struct BackNavigationModifier : ViewModifier
A ViewModifier that adds a custom back button for NavigationStack views, which allows integration with NavigatingViewDestinationable-conforming Views.
-
The button image to show for the back button.
Declaration
Swift
@MainActor public var buttonImage: Image -
An optional action to perform when the button is tapped.
Declaration
Swift
@MainActor public var selectionAction: (() -> Void)? -
Undocumented
Declaration
Swift
@MainActor public var glassBackgroundVisibility: Visibility -
The initializer.
Declaration
Swift
@MainActor public init(buttonImage: Image? = nil, useGlassBackground: Bool? = nil, selectionAction: (() -> Void)? = nil)Parameters
buttonImageThe button image to show for the back button.
useGlassBackgroundDetermines whether the Liquid Glass background should be shown in iOS 26. The default visibility is
automatic.selectionActionAn optional action to perform when the button is tapped.
-
Declaration
Swift
@MainActor public func body(content: Content) -> some View
View on GitHub