Reputation: 3
I have 3 controllers like that: A -> B -> C A: Present to B B: Present to C
From C, I used the code below to transition to A
window.rootViewController = nil
window.rootViewController = vc
let options: UIView.AnimationOptions = .transitionCrossDissolve
let duration: TimeInterval = 0.3
UIView.transition(with: window, duration: duration, options: options, animations: {}, completion: { _ in
})
window.makeKeyAndVisible()
But a few errors occurred
1. [Presentation] Presenting view controller <UIAlertController: 0x146902400> from detached view controller <B> is discouraged.
2. [Assert] Trying to dismiss the presentation controller while transitioning already.(<_UIAlertControllerAlertPresentationController: 0x14503bc60>)
3. [Assert] self._currentTransitionDidComplete is nil! for self: <_UIAlertControllerAlertPresentationController: 0x15b287470>; presentedViewController: <UIAlertController: 0x156ba8e00>; presentingViewController: <UINavigationController: 0x15522a200>
Basically it has moved to the correct screen from C to A, but I can't click on any item on the screen.
Please give me suggestions, thank you
Upvotes: 0
Views: 146