<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UINavigationController/setToolbarHidden(_:animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UINavigationController(im)setToolbarHidden:animated:"
  },
  "title" : "setToolbarHidden(_:animated:)"
}
-->

# setToolbarHidden(_:animated:)

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

```
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

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 <doc://com.apple.documentation/documentation/Swift/false> is equivalent to setting the value of the [`isToolbarHidden`](/documentation/UIKit/UINavigationController/isToolbarHidden) property directly. The toolbar simply appears or disappears depending on the value in the `hidden` parameter.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)