UINavigationController: toolbar property
The toolbar property is the bottom toolbar managed by the navigation controller itself, a UIToolbar.
Value
A UIToolbar; always has a value.
- Read-only; assigning to it throws
TypeError. - Every read returns the same object.
- The toolbar is hidden by default; to show it, use
isToolbarHiddenorsetToolbarHidden().
Note: Apple specifies that this toolbar is managed by the navigation controller; don't change its
itemsdirectly.
Examples
js
const nav = new UINavigationController(new UIViewController());
console.log(nav.toolbar instanceof UIToolbar);Result: Prints true.
Corresponding iOS API
UINavigationController.toolbar.