gpt4 book ai didi

ios - 我如何处理连续点击两次的 UITabBarItem 并关闭 segues?

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:00:50 25 4
gpt4 key购买 nike

我的 UITabBarController 缓存了所选项目之前的所有内容,这很好,但我想关闭我呈现的每个 segue 当我单击显示的 View 的项目时,连续两次相同的页面。

我如何以及需要做什么来提供这个案例?解决方案的详细答案那就太好了。

最佳答案

使用tabbarControler委托(delegate)方法

- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController
{
if (alreadyPushed){
return false
}
return true
}

关于ios - 我如何处理连续点击两次的 UITabBarItem 并关闭 segues?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36948282/

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