Returns a Boolean value indicating whether the navigation bar should push an item.
SDKs
- iOS 2.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- UIKit
Declaration
optional func navigationBar(_ navigationBar: UINavigation Bar, shouldPush item: UINavigation Item) -> Bool
Parameters
navigationBar
The navigation bar that the item is being pushed onto.
item
The navigation item that is being pushed.
Return Value
true
if the item should be pushed; otherwise, false
.
Discussion
Sent to the delegate before pushing an item onto the navigation bar.