Instance Method

setNavigationBarHidden(_:animated:)

Sets whether the navigation bar is hidden.

Declaration

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

Parameters

hidden

Specify true to hide the navigation bar or false to show it.

animated

Specify true if you want to animate the change in visibility or false if you want the navigation bar to appear immediately.

Discussion

For animated transitions, the duration of the animation is specified by the value in the UINavigationControllerHideShowBarDuration constant.

See Also

Configuring Navigation Bars

var navigationBar: UINavigationBar

The navigation bar managed by the navigation controller.