The previewer shows the image with proper opacity (kinda washed out). However, when I preview or run this on my iPhone (14 pro) the opacity doesn’t work. The image is full/vibrant color. I’d like to have it washed out since it’s the background image.
var body: some View {
NavigationView {
ZStack {
Image("TrackView")
.resizable()
.ignoresSafeArea()
.persistentSystemOverlays(.hidden)
.opacity(0.5)
This works fine for me on the simulator I am using so maybe try resetting your simulator or try another simulator.
Note that the home bar at the bottom fades out soon after the app is launched due to the addition of the modifier .persistentSystemOverlays(.hidden). It comes back after you tap anywhere on the screen but fades out again after 2 seconds.