defaultAdaptableTabBarPlacement
Specifies the default placement for the tabs in a tab view using the adaptable sidebar style.
Declaration
compose().defaultAdaptableTabBarPlacement(
defaultPlacement?: SwiftUI.AdaptableTabBarPlacement
)nonisolated func defaultAdaptableTabBarPlacement(
_ defaultPlacement: AdaptableTabBarPlacement = .automatic
) -> some ViewParameters
defaultPlacementSwiftUI.AdaptableTabBarPlacementThe default arrangement for the tab view.
Discussion
This modifier is only effective on iPadOS in the
TabViewStyle.sidebarAdaptable style. In any other configuration,
the system ignores it.
The following example shows a TabView with three tabs, where
the tab view displays the sidebar representation when the app
initially launches.
TabView(selection: $selection) {
Tab("Home", systemImage: "house", value: MyTab.home) {
MyHomeView()
}
Tab("Downloads", systemImage: "square.and.arrow.down.fill",
value: MyTab.downloads
) {
MyDownloadsView()
}
Tab("Browse", systemImage: "list.bullet", value: MyTab.browse) {
MyBrowseView()
}
}
.tabViewStyle(.sidebarAdaptable)
.defaultAdaptableTabBarPlacement(.sidebar)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.
- 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.
- 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.