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

[Suggestions] Support change duration in update #1

Open
jctaoo opened this issue Aug 14, 2020 · 0 comments
Open

[Suggestions] Support change duration in update #1

jctaoo opened this issue Aug 14, 2020 · 0 comments

Comments

@jctaoo
Copy link
Owner

jctaoo commented Aug 14, 2020

example:
old

        Toast.default.update(item: self.scanningToastItem) { item in
          item.title = "扫描完成"
        }
        DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
          Toast.default.remove(self.scanningToastItem)
        }

new

        Toast.default.update(item: self.scanningToastItem) { item in
          item.title = "扫描完成"
          item.duration = .timeInterval(duration: 1)
        }
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

1 participant