当我推送到新的 View Controller 时,我得到了这个:
在 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/