RootViewTransition
open class RootViewTransition : ViewTransition
Class, that implements transition for UIWindow.rootViewController
.
-
Transition type, defaults to .show.
Declaration
Swift
open var transitionType: TransitionType
-
CUrrently visible view finder. Defaults to nil and is not used in current transition.
Declaration
Swift
open var viewFinder: ViewFinder?
-
UIWindow
instance on which transition will be performed.Declaration
Swift
public let window: UIWindow
-
Duration of animated transition. Defaults to 0.3 seconds.
Declaration
Swift
open var duration: TimeInterval
-
Animation options for transition. Defaults to UIView.AnimationOptions.transitionCrossDissolve.
Declaration
Swift
open var animationOptions: UIView.AnimationOptions
-
Should the transition be animated.
Declaration
Swift
open var isAnimated: Bool
-
Creates
RootViewTransition
from specifiedUIWindow
instance.Declaration
Swift
public init(window: UIWindow, isAnimated: Bool = true)
Parameters
window
UIWindow
, on which transition will be happening.isAnimated
Should the transition be animated.
-
Performs UIWindow.rootViewController switch using
UIView.transition(with:duration:options:animations:completion:)
method.Declaration
Swift
open func perform(with view: ViewController?, on visibleView: ViewController?, completion: ((Bool) -> Void)?)
Parameters
view
View that will be set as a
rootViewController
.visibleView
Currently visibleView. Unused in this method.
completion
Called once transition has been completed.