DIStoryboard

public final class DIStoryboard : _DIStoryboardBase

The class provides the features to inject dependencies of view/window controllers in a storyboard. Needs to specify a container to inject dependencies in view/window controllers.

  • Creates new instance of DIStoryboard. When initializing itself, it finds a container and other information about the storyboard.

    Declaration

    Swift

    @objc
    public class func create(name: String, bundle: Bundle?) -> DIStoryboard

    Parameters

    name

    The name of the storyboard resource file without the filename extension.

    bundle

    The bundle containing the storyboard file and its resources.

    Return Value

    The new instane of DIStoryboard.

  • Creates new instance of DIStoryboard, with the specified container.

    Declaration

    Swift

    public class func create(name: String, bundle: Bundle?, container: DIContainer) -> DIStoryboard

    Parameters

    name

    The name of the storyboard resource file without the filename extension.

    container

    The container with registrations of the view/window controllers in the storyboard ant their dependencies.

    Return Value

    The new instane of DIStoryboard.

  • Creates new instance of DIStoryboard, with the specified container.

    Declaration

    Swift

    public class func create(name: String, bundle: Bundle?, framework: DIFramework.Type?, container: DIContainer) -> DIStoryboard

    Parameters

    name

    The name of the storyboard resource file without the filename extension.

    bundle

    The bundle containing the storyboard file and its resources. Specify nil to use the main bundle.

    framework

    The framework containing the storyboard registration. Specify nil to find storyboard into all registrations.

    container

    The container with registrations of the view/window controllers in the storyboard ant their dependencies.

    Return Value

    The new instane of DIStoryboard.

  • Instantiates the view controller with the specified identifier. The view controller and its child controllers have their dependencies injected as specified in the container passed to the initializer of the self.

    Declaration

    Swift

    public override func instantiateViewController(withIdentifier identifier: String) -> UIViewController

    Parameters

    identifier

    The identifier set in the storyboard file.

    Return Value

    The instantiated view controller with its dependencies injected.

  • Instantiates the view/window controler with the specified identifier. The view/window controller and tis child controllers hase their dependencies injected as specified in the container passed to the initializer of the self.