ContextAccepting

public protocol ContextAccepting : UIViewController

The protocol for a UIViewController to make it compatible with ContextSettingTask.

Associated types

  • Type of Context object that UIViewController can deal with

    Declaration

    Swift

    associatedtype Context

Methods to implement

  • checkCompatibility(with:) Default implementation

    If UIViewController does not support all the permutations that context instance may have - setup the check here.

    Throws

    throws Error if Context instance is not supported.

    Default Implementation

    Default implementation does nothing.

    Declaration

    Swift

    static func checkCompatibility(with context: Context) throws

    Parameters

    context

    Context instance.

  • ContextSettingTask will call this method to provide the Context instance to the UIViewController that has just been build or found.

    Throws

    throws Error if Context instance is not supported. Router will stop building the rest of the stack in this case.

    Declaration

    Swift

    func setup(with context: Context) throws

    Parameters

    context

    Context instance.