PKGInstantiatableController
public protocol PKGInstantiatableController
This protocol defines an instantiatable controller from its code construction.
-
This is the controller creation point. In this function you should create a controller from code. DO NOT CALL DIRECTLY this function to create the controller. You should call
instantiate(with:)
!!Declaration
Swift
static func create() -> UIViewController & PKGControllerProtocol
-
shouldWrapInNavigationController
Default implementationIf true, the controller previously created is wrapped in a NavigationController. False otherwise. The default implementation returns false.
Default Implementation
Declaration
Swift
static var shouldWrapInNavigationController: Bool { get }
-
configure(selfController:
Default implementation) This function enables you to configure the controller. The default implementation is empty.
Default Implementation
Declaration
Swift
static func configure(selfController: UIViewController)
Parameters
selfController
the controller previously created. If
shouldWrapInNavigationController
returns false,selfController
is a NavigationController. -
instantiate(with:
Extension method) Instantiate this controller. You can provide a package to transfer data between this controller and next controller.
Declaration
Swift
public static func instantiate(with package: Package? = nil) -> UIViewController
Parameters
package
the package containing data.