-
-
Notifications
You must be signed in to change notification settings - Fork 64
Add AlertScene
#299
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
base: main
Are you sure you want to change the base?
Add AlertScene
#299
Conversation
An empty block returns the default "OK" action. `AlertScene` and `presentAlert` now require the `actions` parameter; an empty closure provides the previous behavior.
stackotter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be handy to have around. I've requested a few changes, but for the most part you've implemented it very well 🙏
Sources/SwiftCrossUI/Environment/Actions/PresentAlertAction.swift
Outdated
Show resolved
Hide resolved
|
Just did some local testing. It works with AppKitBackend, and GtkBackend. It crashes with UIKitBackend; WindowingExample crashes with Gtk3Backend for an unrelated reason (#308); now resolved by your #309 PR. WindowingExample crashes with WinUIBackend as soon as the windows appear, but I'm not sure why. I'm currently looking into whether it's related or not, but I'm having issues with my Windows VM. |
AlertSceneis a scene that presents a whole-app modal alert (or the backend's closest approximation thereof). It behaves similarly toView.alert(_:isPresented:actions:), but isn't attached to any one window.