我设置了一个带有图像的导航链接,默认情况下,当用户按下导航链接时,图像的不透明度会降低到 30-40% 左右。
我想知道如何防止这种情况发生以及如何将不透明度设置为我需要的任何值。
我的代码:
NavigationLink(destination:
PostPageView()
.navigationBarTitle(Text("Post"), displayMode: .inline)
.foregroundColor(Color("blackAndWhite"))
){
Image("partyyy").resizable().frame(height: 300)
}
Run Code Online (Sandbox Code Playgroud)
您可以在下面看到带有示例的图像。感谢你的帮助!