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

Alert fails to show if a prior alert was dismissed ~1 second or less prior. #125

Closed
haseebq opened this issue Nov 23, 2015 · 2 comments
Closed

Comments

@haseebq
Copy link

haseebq commented Nov 23, 2015

If alerts are shown in quick succession (i.e. first dismiss an alert and then shown another right after dismissing the prior alert) [SDCAlertController presentWithAnimated] fails with the following message:

Warning: Attempt to present "SDCAlertController: 0x7f9b99ab0760" on "SDCAlertController: 0x7f9b9fd44af0" whose view is not in the window hierarchy!

The workaround seems to be to wait atleast a second or two before calling presentWithAnimated. Any ideas why this is happening?

@sberrevoets
Copy link
Owner

Yeah this is more or less expected. You can't present on view controllers that haven't been fully presented yet. If you try the same with UIAlertController, it will give you that same warning.

The solution is a system that's a little more flexible, which I'm planning to implement but haven't gotten to yet. See #112.

@sberrevoets
Copy link
Owner

Closing this as a duplicate of #112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants