DefaultStackIterator
public struct DefaultStackIterator : StackIterator
Default implementation of StackIterator
protocol
-
A starting point in the
UIViewController
s stack- topMost: Start from the topmost
UIViewController
- root: Start from the
UIWindow
s rootUIViewController
- custom: Start from the custom
UIViewController
Declaration
Swift
public enum StartingPoint
- topMost: Start from the topmost
-
SearchOptions
to be used byStackIteratingFinder
Declaration
Swift
public let options: SearchOptions
-
A starting point in the
UIViewController
s stackDeclaration
Swift
public let startingPoint: StartingPoint
-
WindowProvider
to get properUIWindow
Declaration
Swift
public let windowProvider: WindowProvider
-
ContainerAdapter
instance.Declaration
Swift
public let containerAdapterLocator: ContainerAdapterLocator
-
Constructor
Declaration
Swift
public init(options: SearchOptions = .fullStack, startingPoint: StartingPoint = .topmost, windowProvider: WindowProvider, containerAdapterLocator: ContainerAdapterLocator)
-
Deprecated Constructor. May create a conflict with default configuration. Please use
DefaultStackIterator.init(options:startingPoint:windowProvider:containerAdapterLocator:)
.Declaration
Swift
@available(*, deprecated, message: "May create a conflict with default configuration. Please use init(options:startingPoint:windowProvider:containerAdapterLocator:﹚") public init(options: SearchOptions = .fullStack, startingPoint: StartingPoint = .topmost)
-
Returns
UIViewController
instance if foundDeclaration
Swift
public func firstViewController(where predicate: (UIViewController) -> Bool) throws -> UIViewController?
Parameters
predicate
A block that contains
UIViewController
matching condition