ContextInstantiatable

@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
public protocol ContextInstantiatable : View

View instance should conform to this protocol to be used with UIHostingControllerWithContextFactory

  • Type of Context object that View can be initialised with

    Declaration

    Swift

    associatedtype Context
  • Constructor

    Declaration

    Swift

    init(with context: Context)

Available where Context == Void

  • init() Extension method

    Constructor

    Declaration

    Swift

    init()

Available where Context == Any?

  • init() Extension method

    Constructor

    Declaration

    Swift

    init()