Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在视图中使用自定义导航栏,并且我希望该栏不可见(当然文本和按钮除外)。视图是白色的,因此栏的背景也需要是白色或透明的。但无论如何,我尝试了什么,它总是几乎看不见:
这就是它的样子(我知道你必须努力看,但底线是可见的):
如果我需要编写任何代码,请使用 swift
尝试这个 :
self.navigationBar.setBackgroundImage(UIImage(), for: .default) self.navigationBar.shadowImage = UIImage() self.navigationBar.isTranslucent = true