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 without duration does not work in Swift 2.0 #76

Open
vigohe opened this issue Nov 16, 2015 · 3 comments
Open

Notification without duration does not work in Swift 2.0 #76

vigohe opened this issue Nov 16, 2015 · 3 comments

Comments

@vigohe
Copy link

vigohe commented Nov 16, 2015

This sentence does not work:

self.notification.displayNotificationWithMessage("Hello", completion: nil)

@delebedev
Copy link

I observe identical issue using objc version (calling it from swift though but it does not matter).

notification gets immediately deallocated after this call, in contrast to forDuration call where notification retains itself:

[self displayNotificationWithView:view completion:^{
        self.dismissHandle = perform_block_after_delay(duration, ^{
            [self dismissNotification];
        });
    }];

this looks pretty strange to me, no idea what is clever fix

@jorgemejia
Copy link

The same on objc version

@jorgemejia
Copy link

To fix it i have to declare global CWStatusBarNotification * notification; and to instantiate the class only have to do this: notification = [CWStatusBarNotification new];
I guess is the same for swift

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