This commit is contained in:
Alexey Gerasimov 2018-03-30 19:32:23 +03:00
parent 828d63838c
commit 63324eec7e
1 changed files with 3 additions and 2 deletions

View File

@ -38,8 +38,9 @@ public extension UIWindow {
animateRootViewControllerChanging(controller: controller)
}
rootViewController?.dismiss(animated: false) { [weak self] in
self?.rootViewController?.view.removeFromSuperview()
let previousRoot = rootViewController
previousRoot?.dismiss(animated: false) {
previousRoot?.view.removeFromSuperview()
}
rootViewController = controller