iOS 17 Inspector does not respect new iOS 16.4 sheet modifiers such as .presentationBackground

Hi there,

Feedback ID: FB13479210

XCode 15.1. iOS 17.2

Inspector sheet is not shown as ultra thin material as expected.

Full code:

import SwiftUI

@main 
struct InspectorExample: App {
    var body: some Scene {
        WindowGroup {
            InspectorExampleView()
        }
    }
}

struct InspectorExampleView: View {
    @State private var inspectorPresented = false
    @State private var departmentId: String?
    @State private var employeeIds: String?
    
    var body: some View {
        Button("Click") {
            inspectorPresented = true
        }.background(.white)
        .inspector(isPresented: $inspectorPresented) {
            Text("Sample Inspector")
                .presentationBackground(.ultraThinMaterial)
        }.background(.blue)
    }
}

Thats the way I go, feel free to give it a trail.

import SwiftUI

@main
struct UltraThinMaterialApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

struct ContentView: View {
    @State private var showingSheet = false

    var body: some View {
        Button("Show Sheet") {
            showingSheet = true
        }
        .sheet(isPresented: $showingSheet) {
            // Sheet content with ultra-thin material effect
            VStack {
                Text("This is an ultra-thin material sheet.")
                Button("Dismiss") {
                    showingSheet = false
                }
            }
            .frame(width: 300, height: 200)
            .background(Material.ultraThin, in: RoundedRectangle(cornerRadius: 10))
        }
    }
}
iOS 17 Inspector does not respect new iOS 16.4 sheet modifiers such as .presentationBackground
 
 
Q