Drops
Drops copied to clipboard
Possible issue with "drop" not being dismissed after navigating away from View Controller
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!
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 😃