---
title: "navigationBarNSToolbarSection(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uinavigationbardelegate/navigationbarnstoolbarsection(_:)"
---

# navigationBarNSToolbarSection(_:)

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

## Declaration

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

## Parameters

- `navigationBar`: The navigation bar to host in an doc://com.apple.documentation/documentation/AppKit/NSToolbar.

## Return Value

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

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