Contents

contentMarginsRemoved(_:)

Configures whether the content margins are removed.

Declaration

nonisolated func contentMarginsRemoved(_ removed: Bool = true) -> some CustomizableToolbarContent

Parameters

  • removed:

    Whether the content margins should be removed.

Discussion

Use this modifier to remove the default padding around a toolbar item’s content. This is useful for content that goes to the edge of the item.

.toolbar(id: "main") {
    ToolbarItem(id: "custom") {
        CustomButton()
    }
    .contentMarginsRemoved()
}