Skip to content

Instantly share code, notes, and snippets.

@VAndrJ
Last active January 4, 2025 12:06
Show Gist options
  • Save VAndrJ/1622bb378ed9b5f557d86d607286f2ee to your computer and use it in GitHub Desktop.
Save VAndrJ/1622bb378ed9b5f557d86d607286f2ee to your computer and use it in GitHub Desktop.
Issue on iOS 18.0+ with Xcode 16.0+
import SwiftUI
struct ContentView: View {
@State private var isSheetPresented = false
var body: some View {
Button("Open sheet") {
isSheetPresented = true
}
.sheet(isPresented: $isSheetPresented) {
ScrollView {
LazyVStack(spacing: 16) {
ForEach(0..<30, id: \.self) { index in
Button {
print("\(index) button action")
} label: {
Text("\(index) button")
.frame(maxWidth: .infinity, idealHeight: 64)
}
.buttonStyle(BorderedProminentButtonStyle())
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment