jcoleman / JCNotificationBannerPresenter

A library for generic presentation of "banners" (e.g. to present a push notification) from anywhere inside an iOS app.
MIT License
198 stars 46 forks source link

Please add instructions how to use in swift for beginners (no knowledge of bridging headers) #32

Closed mika76 closed 9 years ago

jcoleman commented 9 years ago

I haven't yet had the opportunity to use Swift in any of my projects; I'm of course open to pull requests.

zdesiree commented 8 years ago

If you want to use it in your Swift project, just install the pod and import it in your Bridging-Header like this #import <JCNotificationBannerPresenter/JCNotificationCenter.h> If you don't already have a Bridging-Header create one as described here: https://bohemianpolymorph.wordpress.com/2014/07/11/manually-adding-a-swift-bridging-header/

In your Swift files where you want to use the library import it like this: import JCNotificationBannerPresenter

And finally use it like this: JCNotificationCenter.enqueueNotificationWithTitle(mytitle, message: mymessage) {}