StackIteratingFinder

public protocol StackIteratingFinder : Finder

StackIteratingFinder iterates through the view controllers stack following the search options provided. It simplifies the creation of the finders for a hosting app.

Associated types

  • Type of UIViewController that StackIteratingFinder can find

    Declaration

    Swift

    associatedtype ViewController
  • Type of Context object that StackIteratingFinder can deal with

    Declaration

    Swift

    associatedtype Context

Properties to implement

Methods to implement

  • The method to be implemented by the StackIteratingFinder instance

    Declaration

    Swift

    func isTarget(_ viewController: ViewController,
                  with context: Context) -> Bool

    Parameters

    viewController

    A view controller in the current view controller stack

    context

    The Context instance provided to the Router.

    Return Value

    true if this view controller is the one that Finder is looking for, false otherwise.

  • findViewController(with:) Extension method

    Declaration

    Swift

    func findViewController(with context: Context) throws -> ViewController?