FB12326152: When using an Inspector instead of a Sheet, the .presentationBackground modifier does not work
tngranados opened this issue · comments
- Date: 2023-06-12
- Resolution: Open
- Area: SwiftUI
- OS: iOS 17.0
- Type: Incorrect/Unexpected Behavior
Description
The new .inspector(isPresented:content:) modifier uses a sheet on an iPhone to display its content. We can use most of the modifiers that work with a sheet on it, like .presentationDetents, .presentationDragIndicator or .presentationBackgroundInteraction, but when using .presentationBackground, nothing happens.
I’m attaching an Xcode project that showcases the issue. The view has the same testView
attached twice, once as a .sheet and once an .inspector. There are also two buttons, one that opens the .sheet and one that opens the .inspector.
To replicate the issue:
- Open the attached sample project, run it, tap on the “Inspector” button
Expected results:
- Both the sheet and the inspector look the same
Actual results:
- The sheet shows the .thinMaterial it has applied, but the inspector shows the default background
Xcode version I’m using: Version 15.0 beta (15A5160n)