HierarchyViewHeader
public struct HierarchyViewHeader
extension HierarchyViewHeader: View
extension HierarchyViewHeader: _ViewEmptyChecking
HierarchyViewHeader provides navigation controls and summary context at the top of a HierarchyView.
Overview
Use HierarchyViewHeader to display the title of the currently focused parent item and to offer backward/forward navigation across the hierarchy. The header can be customized to add leading and trailing accessory views. If no custom header is provided, HierarchyView displays a default HierarchyViewHeader.
Key Features
- Title content to reflect current hierarchy context.
- Leading and trailing accessory slots for custom navigation controls.
- Integrates with HierarchyView’s activeChildItem to drive forward navigation.
See Also
HierarchyView, HierarchyIndicator, HierarchyItemView.
-
Undocumented
Declaration
Swift
public init(@ViewBuilder title: () -> any View, @ViewBuilder leadingAccessory: () -> any View = { EmptyView() }, @ViewBuilder trailingAccessory: () -> any View = { EmptyView() }, componentIdentifier: String? = HierarchyViewHeader.identifier) -
Undocumented
Declaration
Swift
static let identifier: String -
Undocumented
Declaration
Swift
init(title: AttributedString, @ViewBuilder leadingAccessory: () -> any View = { EmptyView() }, @ViewBuilder trailingAccessory: () -> any View = { EmptyView() }) -
Undocumented
Declaration
Swift
init(_ configuration: HierarchyViewHeaderConfiguration) -
Declaration
Swift
@MainActor public var body: some View { get } -
Undocumented
Declaration
Swift
public var isEmpty: Bool { get }