Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aciidgh committed Sep 4, 2015
1 parent bc144f8 commit 7879dec
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# iOSNotificationBanner

This library allows you to show in-app notification.

Features:
- Enqueue unlimited notifications
- Show any type of view as notification via custom Nib or view
- Cancel enqueued notifications if needed

# Example

![Screenshot](http://i.imgur.com/gMe0xbo.png?2)

####The singleton!

```swift
let notificationCenter = NotificationBannerCenter.defaultCenter
```

####Enqueue Notification

```swift
num = 0
let chatNotificationView = ChatNotificationView.loadFromNib()
chatNotificationView.nameLabel.text = "John Doe"
chatNotificationView.messageLabel.text = "\(num) Hey, My name is John Doe!"
chatNotificationView.thumbImageView.image = UIImage(named: "johndoe.jpg")
chatNotificationView.context = "\(num)"
chatNotificationView.tapClosure = { (nbView: NBView) in
println((nbView as! ChatNotificationView).messageLabel.text)
}
notificationCenter.enQueueNotification(chatNotificationView)
```

####Cancel Notification

```swift
let exampleContext = 0
notificationCenter.cancelNotificationsWithContexts(["\(exampleContext)"])
```

#Licenses

MIT

0 comments on commit 7879dec

Please sign in to comment.