CustomContainerViewController
@MainActor
public protocol CustomContainerViewController : ContainerViewController
Custom ContainerViewControllers created outside of the library should extend this protocol, so DefaultContainerAdapterLocator
could provide their ContainerAdapter to the DefaultRouter and other library’s instances when needed.
NB: If you want to substitute the ContainerAdapter for the container view controllers that are handled by library such as
UINavigationController you may create the extensions for such container view controllers in your project.
public extension UINavigationController: CustomContainerViewController {
var adapter: ContainerAdapter {
return CustomNavigationAdapter(with: self)
}
}
-
ContainerAdapterto be provided byDefaultContainerAdapterLocatorDeclaration
Swift
@MainActor var adapter: ContainerAdapter { get }