SplitViewCurrentlyVisibleViewFinder
open class SplitViewCurrentlyVisibleViewFinder : CurrentlyVisibleViewFinder
CurrentlyVisibleViewFinder
that proritizes either master or detail view controller in split view controllers.
Please note that this ViewFinder should only be used for iPad interfaces that do not have collapsed UISplitViewControllers.
If UISplitViewController is collapsed, it’s viewControllers
property only returns one of two(master,detail) view controllers and therefore it’s impossible to know if one of those is a master or a detail.
-
Kind of view controller that should be prioritized when searching for currently visible view controller
See moreDeclaration
Swift
public enum Kind
-
Kind of view controller that should be prioritized when searching for currently visible view controller
Declaration
Swift
public let kind: Kind
-
Creates
SplitViewCurrentlyVisibleViewFinder
that prioritizeskind
view controller when searching for currently visible view controller.Declaration
Swift
public init(kind: Kind, rootViewProvider: RootViewProvider?)
Parameters
kind
master or detail view
rootViewProvider
provider of root view in hierarchy
-
Recursively searches view hierarchy for currently visible view. When
UISplitViewController
is encountered,kind
is prioritized (.master: viewControllers.first, .detail: viewControllers.last)Declaration
Swift
open override func findCurrentlyVisibleView(startingFrom view: ViewController?) -> ViewController?
Parameters
view
view to start search from
Return Value
currently visible view.