scalessec/Toast

many views toast all together bug!!!

Closed this issue · 3 comments

when I Click a button many times,and so the method : makeToast: will call many times,so that ,many toast views will show,it looks strange,like the file below
Uploading 511F9830-55D9-43AC-B9D0-D102B57AB13D.png…

so there exists a bug ?and why not use a Singleton ? or check if a toast view show or not when we call the method makeToast ? thanks

a744384e-e86f-4c6d-9f1b-20d929981c95

the normal toast view is here and the above is not normal

What you're seeing is the shadows layered on top of one another. You can change or modify the shadow in CSToastStyle. A singleton is not a good solution, because any UIView instance can display a toast and they can all display simultaneously if desired. Feel free to fork to get the behavior you want.