ios - Swift - 推送到新 ViewController 时黑色底栏

标签 ios swift

当我推送到新的 View Controller 时,我得到了这个:

image of the problem

在 Storyboard中,我没有将 hidesBottomBarWhenPushed 设置为 true。 在如上图所示的“更多” View 中,我有这个,其中 PostsController 是图像中的“Like” View :

let destinationVC = segue.destination as! PostsController
destinationVC.hidesBottomBarWhenPushed = true

此外,“更多” View 中有一个底部标签栏。

我应该怎么做才能删除这个黑色空间? 谢谢!

最佳答案

你可以把它放在你的PostsController中,而不是在segue中进行

override var hidesBottomBarWhenPushed: Bool {
    get {
        return true
    }
    set {
        self.hidesBottomBarWhenPushed = newValue
    }
}

关于ios - Swift - 推送到新 ViewController 时黑色底栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55830531/

相关文章:

javascript - 在旋转 Js 上更改变量的值

ios - 当我的 UITableViewCell 不再可见时,如何取消对象中的 NSOperation?

ios - 通过 USB 从 Windows 机器查看 Safari/iOS 上的本地网站

ios - 如何在 Swift 中编写 UIViewController 的初始化方法

ios - PFQueryTableViewController...Swift

ios - uinavigationcontroller - 显示堆栈

ios - 在 iOS Swift 中查询 Firebase 的选定值

ios - 从其他应用程序和 NotificationCenter 接收有意义的通知

swift - 如何强制文本字段在 Swift 中仅大写?

ios - 我如何从葫芦中的警报(ios)中读取文本