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

Notification won't dismiss #177

Open
RobSwish opened this issue Aug 17, 2015 · 5 comments
Open

Notification won't dismiss #177

RobSwish opened this issue Aug 17, 2015 · 5 comments

Comments

@RobSwish
Copy link

I have made the notification display upon failure of a network request. If I send the request 2 times, or more, in a row, the notifications gets stuck at the top and won't dismiss until the user restarts the app.

@dmiedema
Copy link
Contributor

Can you give a little more information like some of the options you're using to display the toast notification? It almost sounds like this may be related to #154 but I want to verify you're using the same type of properties for displaying before i jump to any conclusions

@ConfusedVorlon
Copy link

I'm seeing the same issue.

I switched to :head as 0.0.7 displays incorrectly on an iPad in landscape mode.
This now displays correctly - but doesn't auto-dismiss.

NSDictionary *options = @{
                          kCRToastTextKey : message,
                          kCRToastTextAlignmentKey : @(NSTextAlignmentCenter),
                          kCRToastBackgroundColorKey : [UIColor lightGrayColor],
                          kCRToastTextColorKey : [UIColor orangeOff],
                          kCRToastAnimationInTypeKey : @(CRToastAnimationTypeGravity),
                          kCRToastAnimationOutTypeKey : @(CRToastAnimationTypeGravity),
                          kCRToastAnimationInDirectionKey : @(CRToastAnimationDirectionTop),
                          kCRToastAnimationOutDirectionKey : @(CRToastAnimationDirectionTop)
                          };

[CRToastManager showNotificationWithOptions:options
                            completionBlock:^{

                            }];

@ConfusedVorlon
Copy link

to confirm the relation to #154 changing to CRToastAnimationTypeSpring resolves the issue.

@MaxFrax
Copy link

MaxFrax commented Sep 17, 2015

@ConfusedVorlon Which animation should he change to CRToastAnimationTypeSpring?

@eliburke
Copy link

eliburke commented Oct 5, 2015

I can also confirm the stuck notification as reported here and #154, using the current master (3f7d99e).

It only gets "stuck" when a second notification arrives while the first is still visible, and if kCRToastAnimationInTypeKey and kCRToastAnimationOutTypeKey are BOTH set to CRToastAnimationTypeGravity.

Changing either the AnimationIn or AnimationOut keys to Spring makes the problem go away. Using CRToastManager dismissNotification: fixes it as well... it definitely isn't hung, just failing to clear.

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

5 participants