UIApplicationDelegate
protocol UIApplicationDelegate : NSObjectProtocol
-
Switches root view controller avoiding common problems of unintended animations.
Declaration
Swift
public func setRootViewController(_ viewController: UIViewController, setWindow: ((UIWindow) -> Void)? = nil, completion: (() -> Void)? = nil)
Parameters
viewController
The new view controller to swift to.
setWindow
If
self.window
isnil
, this closure will be executedcompletion
The completion block to execute when the transition is completed.