0

I recently updated my SwiftUI project from iOS 15.3 to 16.4 (target iPhone only) and wanted to test the new feature of presentationDetents apple developer: presentation detents. It seems that this property is simply ignored. All sheets are shown in full screen manner and are not even resizable.

I tested the sheets in the preview (16.4), the simulator (16.4) and on a real device (iOS 16.5.1). In all cases the detents were ignored.

I created a side project which I initially set up with iOS 16.4 which does not have the issue.

Example usage in my main project:

Text("Foo")
  .sheet(isPresented: $isActive) {
    Text("Sheet Content")
      .presentationDetents([.medium])
  }

Xcode iOS Target

enter image description here

My assumption is that something got messed up with the iOS version update. Any help is appreciated!

Kn3cht
  • 135
  • 9

1 Answers1

0

After facing another weird bug of nested sheets always automatically closing the entire sheet stack, I figured out that the issue was a circular dependency within my project.

The particular issue was that I used the library NativePartialSheet before the updated which still was used in one component. This resulted in an unstable navigation stack state.

Kn3cht
  • 135
  • 9