ToolbarDefaultItemKind
A kind of toolbar item a View adds by default.
Declaration
type ToolbarDefaultItemKind = 'search' | 'sidebarToggle' | 'title';struct ToolbarDefaultItemKindPass a literal, or build one with SwiftUI.ToolbarDefaultItemKind from import { SwiftUI } from 'swiftui-react-native'.
Type properties
'search'SwiftUI.ToolbarDefaultItemKind.searchThe search item added by a
View.searchable(text:isPresented:placement:prompt:)modifier.'title'SwiftUI.ToolbarDefaultItemKind.titleThe title and subtitle shown in title bar / navigation bar.
Overview
Views can add toolbar items clients may wish to remove or customize. A
default item kind can be passed to the View.toolbar(removing:) modifier
to remove the item. Documentation on the View placing the default item
should reference the ToolbarDefaultItemKind used to remove the item.
From Apple’s SwiftUI documentation. Code samples there are Swift.
Used by
See also
More in Navigation.
- AdaptableTabBarPlacementA placement for tabs in a tab view using the adaptable sidebar style.
- AutomaticNavigationTransitionA style that automatically chooses the appropriate presentation transition for the current context.
- ContentToolbarPlacementA region of the interface that hosts its own toolbar content.
- CrossFadeNavigationTransitionA navigation transition that cross-fades between the appearing view and the disappearing view.
- DismissSearchActionAn action that can end a search interaction.
- NavigationBarItemTitleDisplayModeA style for displaying the title of a navigation bar.
- NavigationPathA type-erased list of data representing the content of a navigation stack.
- NavigationPathChainNavigationPath with chained calls: SwiftUI.NavigationPath.append(...).
- NavigationPathCodableRepresentationA serializable representation of a navigation path.
- NavigationSplitViewColumnA view that represents a column in a navigation split view.
- NavigationSplitViewVisibilityThe visibility of the leading columns in a navigation split view.
- NavigationTransitionA type that defines the transition to use when navigating to a view.