Declaration
compose().navigationBarBackButtonHidden(
hidesBackButton?: boolean
)nonisolated func navigationBarBackButtonHidden(
_ hidesBackButton: Bool = true
) -> some ViewParameters
hidesBackButtonbooleanA Boolean value that indicates whether to hide the back button. The default value is
true.
Discussion
Use navigationBarBackButtonHidden(_:) to hide the back button for this
view.
This modifier only takes effect when this view is inside of and visible
within a NavigationStack or a NavigationSplitView in narrow size classes.
The example below demonstrates how to hide the navigation back button for a view within a navigation stack:
NavigationStack {
List {
NavigationLink("Mint") {
Color.mint
.navigationBarBackButtonHidden()
}
}
.navigationTitle("Colors")
}See also
More in Navigation.
- assistiveAccessNavigationIconConfigures the view's icon for purposes of navigation.
- asyncImageURLSessionA modifier that adds a URL session for asynchronous images contained in the view to use when fetching image data.
- contentToolbarPopulates the toolbar of the specified content view type with the views you provide.
- defaultAdaptableTabBarPlacementSpecifies the default placement for the tabs in a tab view using the adaptable sidebar style.
- defaultTabBarPlacementSpecifies the preferred placement for the tabs of a TabView in the TabViewStyle.sidebarAdaptable style on platforms where the tab bar cannot adapt between different representations, and only one representation can be shown.
- navigationBarTitleDisplayModeConfigures the title display mode for this view.
- navigationDestinationAssociates a destination view with a presented data type for use within a navigation stack.
- navigationDocumentConfigures the view's document for purposes of navigation.
- navigationLinkIndicatorVisibilityConfigures whether navigation links show a disclosure indicator.
- navigationSplitViewColumnWidthSets a fixed, preferred width for the column containing this view.
- navigationSubtitleConfigures the view's subtitle for purposes of navigation, using a localized string resource.
- navigationTitleConfigures the view's title for purposes of navigation, using a localized string resource.