MMMNavigationStackItem
Objective-C
@protocol MMMNavigationStackItem <NSObject>
Swift
protocol MMMNavigationStackItem : NSObjectProtocol
A token corresponding to a single node (item) of the current UI navigation path. Note that a reference to the token must be stored somewhere or the corresponding item will be popped right away.
-
Should be called by the item’s delegate when the navigation item has been popped as a result of user’s action and must be called when MMMNavigationStack calling
popNavigationStackItem
of the corresponding delegate.Declaration
Objective-C
- (void)didPop;
Swift
func didPop()
-
Should be called by the navigation item’s delegate in rare caes when the corresponding item cannot be popped.
Declaration
Objective-C
- (void)didFailToPop;
Swift
func didFailToPop()
-
Pops all the items currently on the stack above this item, so this one becomes the top. This is an asynchronous operation because it might involving several navigation steps.
Returns YES, if the request to pop was accepted for execution; NO otherwise. The latter means programmers error (such as popping while another pop is in progress) and will terminate the app when assertions are enabled.
Note that the completion handler is executed only if the request has been accepted.
Declaration
Objective-C
- (BOOL)popAllAfterThisItemWithCompletion: (nonnull MMMNavigationStackCompletion)completion;
Swift
func popAllAfterThisItem(completion: @escaping MMMNavigationStackCompletion) -> Bool