hidesBottomBarWhenPushed 无法快速工作 [英] hidesBottomBarWhenPushed not working in swift

查看:38
本文介绍了hidesBottomBarWhenPushed 无法快速工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我使用 hidesBottomBarWhenPushed as

In my project I am using hidesBottomBarWhenPushed as

尝试了 1 个:

  func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        let vc =  AppStoryboard.Chat.instance.instantiateViewController(withIdentifier: "ChatDetailViewController") as! ChatDetailViewController
        vc.hidesBottomBarWhenPushed = true
        navigationController?.pushViewController(vc, animated: true)
    }

但仍然可以看到 tabBar.

But still tabBar is visible.

尝试了 2 个

我也试过 tabBar.isHidden 但没有用.

I also tried tabBar.isHidden but doesn't works .

尝试了 3 个

在我的 TabBarController 类中使用hidesBottomBarWhenPushed = true

推荐答案

试试这个

 func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        let vc =  AppStoryboard.Chat.instance.instantiateViewController(withIdentifier: "ChatDetailViewController") as! ChatDetailViewController
        self.hidesBottomBarWhenPushed = true
        navigationController?.pushViewController(vc, animated: true)
    }

这篇关于hidesBottomBarWhenPushed 无法快速工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆