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

Possible issue with "drop" not being dismissed after navigating away from View Controller #53

Open
nemecek-filip opened this issue May 14, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@nemecek-filip
Copy link

Hello,

I just implemented Drops yesterday in my mostly UIKit app and while testing it, I managed to have "drop" stay visible permanently.

I initialized the Drops in my view controller as per the docs:

class ViewController: UIViewController {
    let drops = Drops(delayBetweenDrops: 1.0)

And then while drop was shown, I navigated away from the view controller and the drop would stay visible until I force quit the app. Even trying to show new drop wouldn't dismiss this old one.

It seems to me that by navigating away, the drops instance would be deallocated and therefore unable to remove the existing drop.

For now I solved it by calling drops.hideAll() in the viewDidDisappear.

So I am curious whether this is indeed an bug or just incorrect usage on my part and I should keep the Drops instance outside the view controllers to ensure its continuous lifespan.

Thanks!

@omaralbeik omaralbeik added bug Something isn't working help wanted Extra attention is needed labels May 14, 2024
@omaralbeik
Copy link
Owner

Hi @nemecek-filip, thanks for reporting!
This is definitely a bug. For now, I think it won't happen if you use the shared Drops instance instead.
Unfortunately, I don't have time to look at this now, feel free to open a pull request with a fix 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants