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

toast<Item>(item: Binding<Item?>, content: (Item) -> AlertToast) modifier #49

Closed
ekurutepe opened this issue Jun 17, 2022 · 2 comments
Closed

Comments

@ekurutepe
Copy link

iOS 15.5 removed the alert<Item>(item: Binding<Item?>, content: (Item) -> Alert) modifier which was super useful to construct an Alert based on the item wrapped by the Binding.

the replacement alert(isPresented: Bool) variants are not as powerful.

It would be really cool to add the item based modifier to AlertToast to enable a straight forward replacement. I can attempt to build it if there is interest and nobody else is working on it.

@elai950
Copy link
Owner

elai950 commented Jan 31, 2023

Hey @ekurutepe ,
Thank you for your suggestion.
Apple have a very specific definition for the word Alert in Apple's systems which is more like those permissions alert views that pop up.
Therefore, renaming the toast modifier name to alert can be quite confusing for some developers.

You're more than welcome to fork the library and refactor the toast view modifier name to alert but for this library, I think it would be best to have a clear separation between Apple's and mine definitions.

@elai950 elai950 closed this as completed Jan 31, 2023
@ekurutepe
Copy link
Author

I guess I did not express my idea clearly enough. I wasn't suggesting to use the same naming but a replacement API to fill the same role so that an item binding can be passed in to populate the contents of the presented toast.

But does not matter for us anymore. We ended up killing the project where we were using AlertToast. Maybe somebody will have the same need and pick this up in the future.

Cheers and keep up the great work.

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