我的导航栏是透明的,只有我的应用中显示的栏按钮处于透明状态。在我的故事板中,我没有标题,因此导航栏看起来没有任何内容,但是当我运行模拟器时,我删除的文本位于导航栏中。导航栏在模拟器中显示文本,但不显示故事板
这是我找到了解决问题:
导航栏应该是什么样子不透明度
导航栏的样子在模拟器
我制作的酒吧透明代码:
//Makes navigation bar translucent
self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default)
self.navigationController?.navigationBar.shadowImage = UIImage()
self.navigationController?.navigationBar.isTranslucent = true
请检查我的答案 – cole