gpt4 book ai didi

ios - 使用标签重新实例化 UITabBarItem

转载 作者:行者123 更新时间:2023-11-30 14:03:00 26 4
gpt4 key购买 nike

我想在每次选择时重新实例化与带有标签 numUITabBarItem 关联的 View Controller 。我能找到的最佳解决方案使用委托(delegate)方法 tabBarController(_:didSelectViewController:) 但这不使用标签。

有什么想法吗?谢谢。

最佳答案

尝试在 tabBarController(_:didSelectViewController:) 方法中使用 UITabBarController 的 selectedIndex 属性。

关于ios - 使用标签重新实例化 UITabBarItem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32765113/

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