gpt4 book ai didi

swift - 访问 UITabBarController 中的内容

转载 作者:行者123 更新时间:2023-11-28 06:01:09 26 4
gpt4 key购买 nike

我有一个方法可以跟踪用户单击 View Controller 中按钮的次数,该 View Controller 是 UITabBarController 的一部分。我想更新导航标题以显示号码。我设置了更新标题的功能,但我似乎无法弄清楚如何从“子” View Controller 访问它。

我确实设置了一个在按下按钮时调用的委托(delegate),但我不知道如何将委托(delegate)设置为标签栏 Controller 。

如何从“子” View Controller 中访问标签栏 Controller ?

最佳答案

你可以使用self.tabBarController

关于swift - 访问 UITabBarController 中的内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49696919/

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