Instance Method


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


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



Specify true to hide the toolbar or false to show it.


Specify true if you want the toolbar to be animated on or off the screen.


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

var toolbar: UIToolbar!

The custom toolbar associated with the navigation controller.

var isToolbarHidden: Bool

A Boolean indicating whether the navigation controller’s built-in toolbar is visible.

class let hideShowBarDuration: CGFloat

This variable specifies the duration when animating the navigation bar. Note that this is a constant value, so it cannot be set.