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

Can't get Shout to work in Swift 3 #126

Closed
ghost opened this issue Oct 27, 2016 · 1 comment
Closed

Can't get Shout to work in Swift 3 #126

ghost opened this issue Oct 27, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 27, 2016

Hi there,

I am really struggling with implementing the Shout in my app, and I have tried to follow the instructions regarding code, as well as trying several other methods in an attempt to make it work.

Here is two attempts I've tried:

        let anno = Announcement(title: "My title", subtitle: "My subtitle", image: UIImage(named: ""), duration: 3.0) { 

            show(shout: anno, to: ViewController)

        }

And:

        let anno = Announcement(title: "My title", subtitle: "My subtitle", image: UIImage(named: ""), duration: 3.0, action: nil)

        show(shout: anno, to: ViewController)

I have also tried to switch between using 'ViewController' and 'self' with no luck. Any ideas on how I would implement this correctly?

Thanks in advance!

@srmds
Copy link

srmds commented Nov 15, 2016

@askaale Try the following, which is working in Swift 3:

import Whisper

let anno = Announcement(title: "My title", 
                        subtitle: "My subtitle",
                        image: UIImage(named: ""),
                        duration: 3.0) 

Whisper.show(shout: anno, to: self)

Note: self can be any viewcontroller.

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

2 participants