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? -
UIWindowinstance 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
RootViewTransitionfrom specifiedUIWindowinstance.Declaration
Swift
public init(window: UIWindow, isAnimated: Bool = true)Parameters
windowUIWindow, on which transition will be happening.isAnimatedShould 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
viewView that will be set as a
rootViewController.visibleViewCurrently visibleView. Unused in this method.
completionCalled once transition has been completed.
View on GitHub
Install in Dash
RootViewTransition Class Reference