Daltron / NotificationBanner

The easiest way to display highly customizable in app notification banners in iOS
MIT License
4.78k stars 662 forks source link

[Question] How to decrease the time banner stays on. #308

Closed alokc83 closed 3 years ago

alokc83 commented 4 years ago

I have been trying to figure out if I can reduce the time that the banner stays on. I couldn't find anything. Can anyone help me, please

roteirod commented 4 years ago

Hi there! I just do it this way:

banner.show()
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
    banner.dismiss()
}
roteirod commented 4 years ago

Actually, it's like this: banner.duration = 2 Just found it :D

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue has been automatically closed due to inactivity.