-
Notifications
You must be signed in to change notification settings - Fork 300
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
SDCAlertController doesn't queue alerts #112
Comments
As far as I know, this is not possible at all with |
I'm almost certain that UIAlertController prevents displaying two alerts on top of each other. They would be displayed sequentially, so alert 2 would be displayed after dismissing alert 1. And this is exactly what I want. |
let alert = UIAlertController(title: "Test", message: "Message", preferredStyle: .Alert)
alert.addAction(UIAlertAction(title: "OK", style: .Cancel, handler: nil))
presentViewController(alert, animated: true, completion: nil)
let alert2 = UIAlertController(title: "Test 2", message: "Message 2", preferredStyle: .Alert)
alert2.addAction(UIAlertAction(title: "OK", style: .Cancel, handler: nil))
presentViewController(alert2, animated: true, completion: nil) This spits out a message in the console: After dismissing the first alert, the second alert is then not shown. |
OK, thanks for testing this. I was right in that I never saw two UIAlerts on top of each other. I was wrong in that the second alert isn't queued but just discarded. I guess I'll have to implement some kind of queuing on top of SDCAlertController. |
Yeah, this is one of the unfortunate changes that came along with I can also look at implementing this on |
I suggest that SDCAlertController just has a callback/delegate that tells when it is dismissed. In this way, the enqueueing mechanism can be implemented in a separate class and SDCAlertController can continue behaving just as a view controller. |
I'm not a fan of I looked into this at some point, and implementation aside I think there are some other questions to look at. For example, should it be possible to " Depending on the answers to these (and probably more) questions, it may not be worth incurring the complexity for only a few cases where it's a little more work to get a few alerts in a row. |
Two subsequent alerts presented using SDCAlertController are not queued the way UIAlertController does. Is there an easy way to add this?
The text was updated successfully, but these errors were encountered: