Skip to content

Problem when try show concatenate toast activity #42

@juanm4

Description

@juanm4

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions