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

Queuing / Stacking #2

Open
problame opened this issue Sep 20, 2013 · 2 comments
Open

Queuing / Stacking #2

problame opened this issue Sep 20, 2013 · 2 comments

Comments

@problame
Copy link
Owner

Right now, when calling showInViewController:... a second time while the first view is still being presented, the new view moves over the old one - not so great.

My idea:

1: Queuing
One could create a queue as a static object of CSNotificationView which holds track of all notifications to show per view controller.
Problem: If there are many notifications stacking, the delay is too long, showing the notification might confuse the user.

2: Queuing + Stacking
Given that there won't be two or three notifications showing in the same time, one could build up a stack inspired by in Apple's Passbook: New notifications appear a bit lower than the previous one and move up when the old is dismissed.
Implementing simple user interaction allowing to kick the view out earlier (--> UIKit Dynamics) might improve UX.

@siburb
Copy link

siburb commented Sep 22, 2013

Having an option between the two would be ideal, then people could use whichever method suited their situation.
What would also be great would be having a method to query whether there is a CSNotificationView on the screen at the time e.g. -(BOOL)isShowing
This way, we could check whether there's already one on the screen and not show a duplicate message.
Loving the class though - great work!

@problame
Copy link
Owner Author

I think stacking would be the best option as a stack also is some kind of queue.
Regarding the isShowing property: It would have to be set by the presenter which animates the view on screen as the CSNotificationView itself does not have any idea whether it is at first position of the stack (=showing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants