Contents

ToolbarTitleMenu

The title menu of a toolbar.

Declaration

struct ToolbarTitleMenu<Content> where Content : View

Overview

A title menu represents common functionality that can be done on the content represented by your app’s toolbar or navigation title. This menu may be populated from your app’s commands like saveItem or printItem.

ContentView()
    .toolbar {
        ToolbarTitleMenu()
    }

You can provide your own set of actions to override this behavior.

ContentView()
    .toolbar {
        ToolbarTitleMenu {
            DuplicateButton()
            PrintButton()
        }
    }

In iOS and iPadOS, this will construct a menu that can be presented by tapping the navigation title in the app’s navigation bar.

Topics

Creating a toolbar title menu

See Also

Setting the toolbar title menu