Contents

navigationBarNSToolbarSection(_:)

Asks the delegate which section of the toolbar to host the navigation bar in.

Declaration

optional func navigationBarNSToolbarSection(_ navigationBar: UINavigationBar) -> UINavigationBar.NSToolbarSection

Parameters

  • navigationBar:

    The navigation bar to host in an Nstoolbar.

Return Value

An NSToolbar section that determines which section to place the navigation bar in, and how to present the navigation bar in that section. Return UINavigationBar.NSToolbarSection.none to disable NSToolbar hosting, which is equivalent to setting preferredBehavioralStyle to UIBehavioralStyle.pad.

Discussion

The system calls this method to determine how to render your UINavigationBar when you build your app with Mac Catalyst.