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

Feature: Ability to define timeout #60

Closed
jaffacake opened this issue Feb 2, 2016 · 4 comments
Closed

Feature: Ability to define timeout #60

jaffacake opened this issue Feb 2, 2016 · 4 comments

Comments

@jaffacake
Copy link

We use the Whisper to display a notification to the user upon an event. It works great, however, we would like the whisper to display longer so that the user has more time to read it.

The ability to pass a timeout value when creating the whisper would be great!

@rbarbosa
Copy link

rbarbosa commented Feb 2, 2016

@jaffacake, that is already possible.
Murmur and Announcement, to display with Shout and Whistle respectively, they have a property to set its duration.
See:
https://github.com/hyperoslo/Whisper/blob/master/Source/Message.swift#L23
https://github.com/hyperoslo/Whisper/blob/master/Source/Message.swift#L38
Depending the initializer you choose, you can either set after the init (to override the default value) or within the initializer.

For the case of Message, to display with Whisper, you can use the method Silent.
See the demo example:
https://github.com/hyperoslo/Whisper/blob/master/Demo/WhisperDemo/WhisperDemo/TableViewController.swift#L34

I hope this helps with your problem.

@jaffacake
Copy link
Author

Oh sorry, I did have a good look through the README but didn't notice anything, I had assume that there was no mention of it there then it'd not be available.

Thanks for your links, very useful.

@RamonGilabert
Copy link
Contributor

Thank you @rbarbosa for the explanation! 🍰

@rbarbosa
Copy link

You are all welcome!

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

3 participants