I've been looking for days. Here's the problem:
I have a Home view controller. When it receives a notification, it presents a NotiViewController, called noti1
, by
`home.present(noti1, animated: true, completion: nil)`.
After 15sec, another notification comes, I get the top view controller topVC
, present another NotiViewController, called noti2
, by
`topVC.present(noti2, animated: true, completion: nil)`.
Each notiVC has an timer which waits for 30sec to dismiss itself. Now I have Home
-> noti1
-> noti2
.
After 15sec, noti1
runs out of time and has to be dismissed. How can I dismiss it without interupting noti2
which is being presenting?
I tried
`orderVC.beginAppearanceTransition(false, animated: false)
orderVC.willMove(toParent: nil)
orderVC.view.removeFromSuperview()
orderVC.removeFromParent()
orderVC.endAppearanceTransition()`
These code does remove the view from screen, but it leaves a UITransitionView behind, which blocks user actions.
This image is took after noti2
is removed from superview etc, so there are 2 UITransitionViews is presenting, blocking user actions.
Any idea? Thanks a lot.