View ModifieriOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+visionOS 1.0+navigationLinkIndicatorVisibility(_:) in SwiftUI
Declaration
compose().navigationLinkIndicatorVisibility(
visibility: SwiftUI.Visibility
)@MainActor @export(implementation) @preconcurrency func navigationLinkIndicatorVisibility(
_ visibility: Visibility
) -> some ViewParameters
visibility*SwiftUI.Visibility
Discussion
If you need to detect whether the navigation disclosure indicator
should be shown for the current view, read the
EnvironmentValues.navigationLinkIndicatorVisibility environment value.
The following example hides the indicator for all links in the list.
The indicator can be hidden for a specific link by placing the
modifier on the NavigationLink itself.
struct NoIndicatorLink: View {
var body: some View {
NavigationStack {
List {
NavigationLink("See detail") {
Text("Detail view")
}
}
.navigationLinkIndicatorVisibility(.hidden)
}
}
}to .visible regardless of whether the link is within a list.
On operating systems prior to iOS 26 and aligned releases,
setting the link indicator visibility to .visible is only
supported for navigation links contained in a List.
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.
- navigationBarBackButtonHiddenHides the navigation bar back button for the view.
- 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.
- 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.