gokulgovind / GLNotificationBar

GLNotificationBar is a ios10 style notification bar, can be used to handle push notification in active state.
MIT License
302 stars 44 forks source link

Bar title and message printing as optional #5

Closed ghost closed 7 years ago

ghost commented 7 years ago

let notificationBar = GLNotificationBar(title: "Today Quote", message: "Yesterday is today's memory, and tomorrow is today's dream.", preferredStyle: .detailedBanner, handler: nil)

        notificationBar.addAction(GLNotifyAction(title: "Like", style: .default, handler: { (action) in
            print("I Like this quote")
        }))
        notificationBar.addAction(GLNotifyAction(title: "Cancel", style: .cancel, handler: nil))
gokulgovind commented 7 years ago

@pprevalon Check CalebeNP's comment on Closed issue,

to "fix" this you just have to make this change:

Before: fileprivate func setUpNotificationBar( header:String!, body:String!, notificationStyle:GLNotificationStyle) After: fileprivate func setUpNotificationBar( header:String, body:String, notificationStyle:GLNotificationStyle)