gpt4 book ai didi

ios - PopToRootViewController 在 UITabBarController 中显示不平衡消息

转载 作者:可可西里 更新时间:2023-11-01 06:13:15 26 4
gpt4 key购买 nike

我有一个 iOS 应用程序,它有两个带有导航 Controller 的选项卡。其中一个选项卡上有一个注销按钮。注销按钮调用一个函数,该函数在另一个选项卡的导航 Controller 上执行 popToRootViewController。这将在调试器中显示以下消息:

Unbalanced calls to begin/end appearance transitions for <UIViewController>.

如果我更改到我试图清除的选项卡,然后调用 popToRootViewController 或者如果我手动循环浏览该导航 Controller 中的所有 View Controller 并调用 ,则不会出现此消息>弹出 View Controller popToRootViewControlleranimated 标志在这两种情况下都设置为 false。这个功能是有意的吗?

最佳答案

将 popRootViewAnimation 设置为“false”,希望它能解决您的问题。

self.navigationController?.popToRootViewControllerAnimated(false)

如果您想了解有关问题的详细信息,请查看此链接:

"Unbalanced calls to begin/end appearance transitions for DetailViewController" when pushing more than one detail view controller

关于ios - PopToRootViewController 在 UITabBarController 中显示不平衡消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44011783/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com