Closed brokaw closed 11 years ago
All right, I like the idea here. I've added several inline comments regarding a few tweaks and some code style consistency issues, but other than that, looks good.
Could you also update the README to document these options?
Thanks for contributing!
Adds a timeout value to JCNotificationBanner:
We wanted some of the notifications to require user interaction to dismiss, and some to automatically dismiss after some timeout period. This is an overview of the changes we made to implement that.
New "designated enqueing" method:
- (void) enqueueNotification:(JCNotificationBanner*)notification;
All convenience calls can go through that and the appropriate locks are in effect. This allows any arbitrary notification to be enqueued. Subclasses and categories can use this method to implement convenience methods with alternate set of parameters. We created one that takes a timeout parameter, for example.
+enqueueNotificationWithTitle:message:tapHandler:
The timeout value is the one defined in the banner class (now set at 5.0 seconds).Net effect is that the code should be backward compatible, but you can set a timeout on specific notification if you want to.
In our tree this is applied on top of the previous pull request (#16), but the changes should be independent.