BottomSheet Animation Delay

184 Views Asked by At

I am working on a bottom sheet for my code using the built in functionality of .sheet. Is there a way for you to disable the initial animation where it comes from the bottom and just have appear on screen when you open up the view.

The video I have attached below better highlights my question. When I open up the view, there is a second or so delay before you see the bottomsheet, I want the sheet to appear instantly when i open up the view and when I hit the back arrow, I want the bottomsheet to disappear.

https://cdn.discordapp.com/attachments/1131394764248453130/1131394867508035625/RPReplay_Final1689815850.mov

My .sheet code

@State public var isSheetPresented = true

.sheet(isPresented: $isSheetPresented) {
                isRecipeView()
                    .presentationDetents([.medium, .large])
                    .presentationDragIndicator(.visible)
                    .presentationBackgroundInteraction(.enabled)
                    .interactiveDismissDisabled()
            }

I have watched close to 20 videos, looked at swiftui documentation on Apple's website and tried trial and error to see if I could make something work.

0

There are 0 best solutions below