---
title: "setToolbarHidden(_:animated:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uinavigationcontroller/settoolbarhidden(_:animated:)"
---

# setToolbarHidden(_:animated:)

Changes the visibility of the navigation controller’s built-in toolbar.

## Declaration

```swift
func setToolbarHidden(_ hidden: Bool, animated: Bool)
```

## Parameters

- `hidden`: Specify doc://com.apple.documentation/documentation/Swift/true to hide the toolbar or doc://com.apple.documentation/documentation/Swift/false to show it.
- `animated`: Specify doc://com.apple.documentation/documentation/Swift/true if you want the toolbar to be animated on or off the screen.

## Discussion

Discussion You can use this method to animate changes to the visibility of the built-in toolbar. Calling this method with the animated parameter set to false is equivalent to setting the value of the isToolbarHidden property directly. The toolbar simply appears or disappears depending on the value in the hidden parameter.

## See Also

### Configuring custom toolbars

- [toolbar](uikit/uinavigationcontroller/toolbar.md)
- [isToolbarHidden](uikit/uinavigationcontroller/istoolbarhidden.md)
- [hideShowBarDuration](uikit/uinavigationcontroller/hideshowbarduration.md)
