Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safe Area Blinking in Resizable Sheet Until Transition Completes #77

Open
stackmak21 opened this issue Nov 2, 2024 · 1 comment
Open

Comments

@stackmak21
Copy link

When presenting a resizable sheet using showResizableSheet function, the safe area briefly blinks or flickers until the transition completes. This happens specifically when the sheet first appears, and it seems to be related to safe area adjustments during the presentation animation. Notably, when using the built-in .sheet view modifier, the transition works perfectly without any flicker. The custom sheet uses specific detents, and there may be state or layout recalculations involved causing this temporary blinking effect. Has anyone encountered this issue or found a way to stabilize the safe area during such transitions?
Note: This bug seems to dissapear when the sheet content composed of a List.

Issue video:
https://github.com/user-attachments/assets/9323928e-2d63-4412-a29c-d28bf26b5f9e

Here is the sample code i have used:

router.showResizableSheet(
sheetDetents: [.medium],
selection: nil,
showDragIndicator: true,
destination: { _ in
QRCodeCapture()
})

struct QRCodeCapture: View {
var body: some View {
VStack{
Image(systemName: "qrcode")
.resizable()
.frame(width: 200, height: 200)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color.blue)
}
}

@bfeher
Copy link

bfeher commented Dec 2, 2024

Bump. I have to manually use .sheet until this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants