Reputation: 21
I have a large code base wherein I have a SwiftUI view and am trying to present a bottom sheet using the following code.
.sheet(isPresented: $isPresentedSheet, content: {
Rectangle().foregroundColor(.pink)
})
For some reason it always shows full screen, and does not support drag down to close. Tested in iOS 13, 14, and 15. If I create a small test app and use the same code, it works correctly. I am not sure why in the larger code base it isn't working. Any ideas?
For the SwiftUI - Half modal suggestion, I'm not sure how that helps my case per se. I want to do something simple, which is to get the sheet
modifier to work correctly.
Upvotes: 0
Views: 4725
Reputation: 21
I finally figured out the problem. The modalPresentationStyle
of .pageSheet
was disabled using method swizzling. I have no idea why that is, but at least I know the answer now. Thanks for all the feedback.
Upvotes: 2