DefaultStackIterator
@MainActor
public struct DefaultStackIterator : StackIterator
Default implementation of StackIterator protocol
-
A starting point in the
UIViewControllers stack- topMost: Start from the topmost
UIViewController - root: Start from the
UIWindows rootUIViewController - custom: Start from the custom
UIViewController
Declaration
Swift
public enum StartingPoint - topMost: Start from the topmost
-
SearchOptionsto be used byStackIteratingFinderDeclaration
Swift
@MainActor public let options: SearchOptions -
A starting point in the
UIViewControllers stackDeclaration
Swift
@MainActor public let startingPoint: StartingPoint -
WindowProviderto get properUIWindowDeclaration
Swift
@MainActor public let windowProvider: WindowProvider -
ContainerAdapterinstance.Declaration
Swift
@MainActor public let containerAdapterLocator: ContainerAdapterLocator
-
Constructor
Declaration
Swift
@MainActor public init(options: SearchOptions = .fullStack, startingPoint: StartingPoint = .topmost, windowProvider: WindowProvider, containerAdapterLocator: ContainerAdapterLocator) -
Returns
UIViewControllerinstance if foundDeclaration
Swift
@MainActor public func firstViewController(where predicate: (UIViewController) -> Bool) throws -> UIViewController?Parameters
predicateA block that contains
UIViewControllermatching condition