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

Problem when try show concatenate toast activity #42

Open
juanm4 opened this issue Jan 21, 2019 · 0 comments
Open

Problem when try show concatenate toast activity #42

juanm4 opened this issue Jan 21, 2019 · 0 comments

Comments

@juanm4
Copy link

juanm4 commented Jan 21, 2019

Hi, I want to concatenate two messages as toast activity, but it doesn't work. Here is mi code:

func testToast(){
        self.view.makeToastActivity(message: "1")
        DispatchQueue.global().async {
            sleep(1)
            DispatchQueue.main.async {
                self.view.hideToastActivity()
                self.view.setNeedsLayout()
                self.view.makeToastActivity(message: "2")
            }
            sleep(1)
            DispatchQueue.main.async {
                self.view.hideToastActivity()
            }
        }
    }

Only the first toast activity is showed and (after 1 second) it is hidden, but the second toast activity never show. Why?, Someone can help me to do what I want????

Thanks in advance!

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