Skip to content

Instantly share code, notes, and snippets.

@VAndrJ
Created January 28, 2025 10:50
Show Gist options
  • Save VAndrJ/d5eb30f48a0039a7ce13daadea952b8b to your computer and use it in GitHub Desktop.
Save VAndrJ/d5eb30f48a0039a7ce13daadea952b8b to your computer and use it in GitHub Desktop.
Sheet presentation detents iOS 18.0+ issue
import SwiftUI
struct ContentView: View {
@State private var isSheetPresented = false
var body: some View {
Button("Open Sheet") {
isSheetPresented = true
}
.sheet(isPresented: $isSheetPresented) {
Text("Sheet Content")
.presentationDetents([.height(480)])
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment