0

I have this basic .sheet in SwiftUI. Is it possible to make it draggable from the top instead from the bottom?

struct MySheet: View {
   @State private var show = true

   var body: some View {
       VStack {

       }
       .sheet(isPresented: $show) {
           Text("Sheet")
            .presentationDetents([.medium, .large])
       }

   }
}
DevB2F
  • 4,674
  • 4
  • 36
  • 60

1 Answers1

0

I doubt this is natively implemented in SwiftUI however you could implement your own sheet presentation as a view and add an .animation(from: .top), even though this will be pain to create a whole navigation system for that but at least it will be reusable and you may end up dumping SwiftUI's navigation system completely and using your own.