divadretlaw / CustomAlert

🔔 Custom Alert for SwiftUI
MIT License
196 stars 18 forks source link

Buttons no longer working on iOS 18 #28

Closed XelarCraft closed 2 months ago

XelarCraft commented 2 months ago

.customAlert("Some Title", isPresented: $showDialog) { VStack{ SmallTextJustified(name: "Some message body") Spacer() }

        } actions: {

            Button(role: .destructive) {
                showDialog = false
            } label: {
                MediumText(name: "Cancel")
            }

            Button {
                showDialog = false
                print("Some message")
            } label: {
                MediumText(name: "Proceed")
            }
        }

The logic to be executed on button press is no longer getting executed on devices running iOS 18.

divadretlaw commented 2 months ago

Thank you for reporting this issue.

I was able to reproduce the issue when using older Xcode versions.

Should be fixed in 4.0.1