我已经在屏幕上展示了一个控制器,现在单击主页按钮。然后我需要在使用深度链接点击通知后展示另一个控制器。当应用程序进入前台时,新的控制器也不会出现,之前的控制器也会被解散。也低于警告:-
Attempt to present <NewController> on <PreviousController> whose view is not in the window hierarchy!
我正在使用下面的代码来呈现。
controller.transitioningDelegate = myDelegateForTransition
controller.modalPresentationStyle = .custom
controller.modalPresentationCapturesStatusBarAppearance = true
viewControllerFromPresent.present(controller, animated: true, completion: {
completionHandler?()
})