Structures

The following structures are available globally.

  • This struct represents the common implementation of the TransitionProtocol. It is used in every of the provided BaseCoordinator subclasses and provides all transitions implemented in XCoordinator.

    Transitions are defined by a Transition.Perform closure. It further provides different context information such as Transition.presentable and Transition.animation. You can create your own custom transitions using Transition.init(presentable:animation:perform:) or use one of the many provided static functions to create the most common transitions.

    Note

    Transitions have a generic constraint to the rootViewController in use. Therefore, not all transitions are available in every coordinator. Make sure to specify the RootViewController type of the TransitionType of your coordinator as precise as possible to get all already available transitions.
    See more

    Declaration

    Swift

    public struct Transition<RootViewController> : TransitionProtocol where RootViewController : UIViewController
  • TransitionOptions specifies transition customization points defined at the point of triggering a transition.

    You can use TransitionOptions to define whether or not a transition should be animated.

    Note

    It might be extended in the future to enable more advanced customization options.
    See more

    Declaration

    Swift

    public struct TransitionOptions
  • UnownedErased is a property wrapper to hold objects with an unowned reference when using type-erasure.

    Create this wrapper using an initial value and a closure to create the type-erased object. Make sure to not create an UnownedErased wrapper for already type-erased objects, since their reference is most likely instantly lost.

    See more

    Declaration

    Swift

    @propertyWrapper
    public struct UnownedErased<Value>
  • UnownedErased is a property wrapper to hold objects with an unowned reference when using type-erasure.

    Create this wrapper using an initial value and a closure to create the type-erased object. Make sure to not create an UnownedErased wrapper for already type-erased objects, since their reference is most likely instantly lost.

    See more
  • WeakErased is a property wrapper to hold objects with a weak reference when using type-erasure.

    Create this wrapper using an initial value and a closure to create the type-erased object. Make sure to not create a WeakErased wrapper for already type-erased objects, since their reference is most likely instantly lost.

    See more

    Declaration

    Swift

    @propertyWrapper
    public struct WeakErased<Value>
  • WeakErased is a property wrapper to hold objects with a weak reference when using type-erasure.

    Create this wrapper using an initial value and a closure to create the type-erased object. Make sure to not create a WeakErased wrapper for already type-erased objects, since their reference is most likely instantly lost.

    See more