Fix passcode crashes

This commit is contained in:
Peter 2019-10-03 05:18:26 +04:00
parent bb9b706c94
commit 772f461352
2 changed files with 9 additions and 3 deletions

View File

@ -154,6 +154,13 @@ open class NavigationController: UINavigationController, ContainableController,
private var _displayNode: ASDisplayNode? private var _displayNode: ASDisplayNode?
public var displayNode: ASDisplayNode { public var displayNode: ASDisplayNode {
if let value = self._displayNode {
return value
}
if !self.isViewLoaded {
self.loadView()
}
return self._displayNode! return self._displayNode!
} }

View File

@ -1082,12 +1082,11 @@ public class Window1 {
} }
public func present(_ controller: ContainableController, on level: PresentationSurfaceLevel, blockInteraction: Bool = false, completion: @escaping () -> Void = {}) { public func present(_ controller: ContainableController, on level: PresentationSurfaceLevel, blockInteraction: Bool = false, completion: @escaping () -> Void = {}) {
if let navigationController = self._rootController as? NavigationController, let controller = controller as? ViewController { if level.rawValue <= 3, let navigationController = self._rootController as? NavigationController, let controller = controller as? ViewController {
navigationController.presentOverlay(controller: controller, inGlobal: false) navigationController.presentOverlay(controller: controller, inGlobal: false)
} else { } else {
assertionFailure() self.presentationContext.present(controller, on: level, blockInteraction: blockInteraction, completion: completion)
} }
//self.presentationContext.present(controller, on: level, blockInteraction: blockInteraction, completion: completion)
} }
public func presentInGlobalOverlay(_ controller: ContainableController) { public func presentInGlobalOverlay(_ controller: ContainableController) {