ios - LNPopupController : The popup controller is already in transition. 将忽略此转换请求

标签 ios animation swift3 popup transition

我正在使用“LNPopupController”来转换 View 。

我被困在一个有时会发生的过程中,但这对我来说是个问题。我正在使用 "LNPopupCustomBarViewController" 并使用

呈现 View Controller
let popup = storyboard?.instantiateViewController(withIdentifier: "myControllerID") as! MYCONTROLLER
self.navigationController?.popupContentView.popupCloseButtonStyle = .round
self.navigationController?.presentPopupBar(withContentViewController: popup, openPopup: true, animated: true, completion:nil)

同时多次呈现和关闭 View Controller 后,我遇到了 UI 完全变形的问题。当我调试这个问题时,我得到了输出

LNPopupController:弹出 Controller 已处于转换中。将忽略此转换请求。

这似乎是由于 View Controller 仍处于过渡状态时呈现的。我单击同时显示 View Controller 的按钮。

如何停止或限制 View 上的用户交互?或者有什么方法可以检查 View 当前的转换状态?

最佳答案

我想我们在 GitHub 上的一个问题中讨论过这个,但这里是“官方”答案:

您应该同步您的流程。每当您调用 present、dismiss、open 和 close 时,您都可以提供完成 block 。在这些中,您应该记下演示文稿的状态,并延迟对这些方法的任何其他调用,直到当前转换完成之后。

关于ios - LNPopupController : The popup controller is already in transition. 将忽略此转换请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48300469/

相关文章:

ios - 使用键盘和中心自动布局管理 View

ios - Filemaker:导出 PLIST(适用于 iOS)

iphone - 如何发布我的更新 (1.1) 而不在 iTunes Connect 中发布 1.0?

ios - 错误处理 - 异步调用

WPF 动画遵循正确的路径,但它在空间中关闭

ios - 如何实现像 google inbox ios app 这样的表格列表?

安卓动态壁纸幻灯片动画

快速设置表格高度

ios - TableView 为零

ios - Swift 3 泛型类型的使用