Toast-Swift icon indicating copy to clipboard operation
Toast-Swift copied to clipboard

Problem when try show concatenate toast activity

Open juanm4 opened this issue 6 years ago • 0 comments

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!

juanm4 avatar Jan 21 '19 12:01 juanm4