ClassFactory

public struct ClassFactory<VC, C> : Factory where VC : UIViewController

The Factory that creates a UIViewController instance using its type.

Associated types

  • Declaration

    Swift

    public typealias ViewController = VC
  • Declaration

    Swift

    public typealias Context = C

Properties

  • A Xib file name

    Declaration

    Swift

    public let nibName: String?
  • A Bundle instance

    Declaration

    Swift

    public let bundle: Bundle?
  • The additional configuration block

    Declaration

    Swift

    public let configuration: ((VC) -> Void)?

Methods

  • Constructor

    Declaration

    Swift

    public init(nibName nibNameOrNil: String? = nil, bundle nibBundleOrNil: Bundle? = nil, configuration: ((VC) -> Void)? = nil)

    Parameters

    nibNameOrNil

    A Xib file name

    nibBundleOrNil

    A Bundle instance if needed

    configuration

    A block of code that will be used for the extended configuration of the created UIViewController. Can be used for a quick configuration instead of ContextTask.

  • Declaration

    Swift

    public func build(with context: C) throws -> VC