UIHostingControllerWithContextFinder
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
@MainActor
public struct UIHostingControllerWithContextFinder<ContentView> : StackIteratingFinder where ContentView : ContextChecking, ContentView : View
A default implementation of the finder, that searches for a UIHostingController with a specific View
and its Context instance.
The View should conform to the ContextChecking to be used with this finder.
-
Declaration
Swift
public typealias ViewController = UIHostingController<ContentView> -
Declaration
Swift
public typealias Context = ContentView.Context
-
A
StackIteratoris to be used byClassWithContextFinderDeclaration
Swift
@MainActor public let iterator: StackIterator
-
Constructor
Declaration
Swift
@MainActor public init(iterator: StackIterator = RouteComposerDefaults.shared.stackIterator)Parameters
iteratorA
StackIteratoris to be used byClassWithContextFinder -
Declaration
Swift
@MainActor public func isTarget(_ viewController: ViewController, with context: Context) -> Bool -
Constructor
Parameters
- options: A combination of the
SearchOptions - startingPoint:
DefaultStackIterator.StartingPointvalue - windowProvider:
WindowProviderinstance. - containerAdapterLocator: A
ContainerAdapterLocatorinstance.
Declaration
Swift
@MainActor init(options: SearchOptions, startingPoint: DefaultStackIterator.StartingPoint = .topmost, windowProvider: WindowProvider = RouteComposerDefaults.shared.windowProvider, containerAdapterLocator: ContainerAdapterLocator = RouteComposerDefaults.shared.containerAdapterLocator) - options: A combination of the
-
A default implementation of the finder, that searches for a
UIHostingControllerwith a specificViewand itsContextinstance.The
Viewshould conform to theContextCheckingto be used with this finder.Declaration
Swift
@MainActor static func hostingControllerWithContextFinder(iterator: StackIterator = RouteComposerDefaults.shared.stackIterator) -> UIHostingControllerWithContextFinder<ContentView>Parameters
iteratorA
StackIteratoris to be used byClassWithContextFinder -
A default implementation of the finder, that searches for a
UIHostingControllerwith a specificViewand itsContextinstance.The
Viewshould conform to theContextCheckingto be used with this finder.Declaration
Swift
@MainActor static var hostingControllerWithContextFinder: UIHostingControllerWithContextFinder { get } -
A default implementation of the finder, that searches for a
UIHostingControllerwith a specificViewand itsContextinstance.The
Viewshould conform to theContextCheckingto be used with this finder.Parameters
- options: A combination of the
SearchOptions - startingPoint:
DefaultStackIterator.StartingPointvalue - windowProvider:
WindowProviderinstance. - containerAdapterLocator: A
ContainerAdapterLocatorinstance.
Declaration
Swift
@MainActor static func hostingControllerWithContextFinder(options: SearchOptions, startingPoint: DefaultStackIterator.StartingPoint = .topmost, windowProvider: WindowProvider = RouteComposerDefaults.shared.windowProvider, containerAdapterLocator: ContainerAdapterLocator = RouteComposerDefaults.shared.containerAdapterLocator) -> Self - options: A combination of the