Pops the top item from the navigation bar's stack and updates the UI.
SDKs
- iOS 2.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- UIKit
Declaration
func popItem(animated: Bool) -> UINavigation Item?
Parameters
animated
true
if the navigation bar should be animated; otherwise,false
.
Return Value
The top item that was popped.
Discussion
Popping a navigation item removes the top item from the stack and replaces it with the back item. The back item’s title is centered on the navigation bar and its other properties are displayed.