我在我的视图背景和导航栏上设置相同的颜色。但是当我运行代码时,颜色是不同的。不知道发生了什么。有人能帮我吗?
self.navigationController?.navigationBar.barTintColor = Utils.Color.bgColor
view.backgroundColor = Utils.Color.bgColor
// some trys to fix the problem...
self.navigationController?.navigationBar.shadowImage = UIImage()
self.navigationController
我有一个NavigationBar视图,里面有一个大的标题和内容。我已经更改了内容背景色和NavigationBar背景色。
var body: some View {
NavigationView {
VStack {
//content
}.background(Color.green)
.edgesIgnoringSafeArea(.bottom) //to fill the white space at the bottom
.navigat