我一直在找几天。这是问题所在:我有一个主视图控制器。收到通知时,它会通过
来显示一个名为noti1
的NotiViewController。`home.present(noti1, animated: true, completion: nil)`.
[15秒后,另一个通知到来,我得到了顶视图控制器topVC
,并通过]展示了另一个NotiViewController,称为noti2
,>
`topVC.present(noti2, animated: true, completion: nil)`.
每个notiVC都有一个计时器,等待30秒自行关闭。现在我有
Home
->noti1
->noti2
。
[15秒后,noti1
用完了,必须取消。如何在不中断正在显示的noti2
的情况下将其关闭?
我尝试过
`orderVC.beginAppearanceTransition(false, animated: false) orderVC.willMove(toParent: nil) orderVC.view.removeFromSuperview() orderVC.removeFromParent() orderVC.endAppearanceTransition()`
这些代码确实从屏幕上删除了视图,但是在后面留下了UITransitionView,它阻止了用户操作。
[此图像是在从超级视图等中删除noti2
之后拍摄的,因此显示了2个UITransitionViews,阻止了用户操作。
有什么想法吗?非常感谢。
我一直在找几天。问题出在这里:我有一个主视图控制器。收到通知时,它会通过`home.present(noti1,animation:true,...