Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.

Commit 7879dec

Browse files
committed
Create README.md
1 parent bc144f8 commit 7879dec

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# iOSNotificationBanner
2+
3+
This library allows you to show in-app notification.
4+
5+
Features:
6+
- Enqueue unlimited notifications
7+
- Show any type of view as notification via custom Nib or view
8+
- Cancel enqueued notifications if needed
9+
10+
# Example
11+
12+
![Screenshot](http://i.imgur.com/gMe0xbo.png?2)
13+
14+
####The singleton!
15+
16+
```swift
17+
let notificationCenter = NotificationBannerCenter.defaultCenter
18+
```
19+
20+
####Enqueue Notification
21+
22+
```swift
23+
num = 0
24+
let chatNotificationView = ChatNotificationView.loadFromNib()
25+
chatNotificationView.nameLabel.text = "John Doe"
26+
chatNotificationView.messageLabel.text = "\(num) Hey, My name is John Doe!"
27+
chatNotificationView.thumbImageView.image = UIImage(named: "johndoe.jpg")
28+
chatNotificationView.context = "\(num)"
29+
chatNotificationView.tapClosure = { (nbView: NBView) in
30+
println((nbView as! ChatNotificationView).messageLabel.text)
31+
}
32+
notificationCenter.enQueueNotification(chatNotificationView)
33+
```
34+
35+
####Cancel Notification
36+
37+
```swift
38+
let exampleContext = 0
39+
notificationCenter.cancelNotificationsWithContexts(["\(exampleContext)"])
40+
```
41+
42+
#Licenses
43+
44+
MIT

0 commit comments

Comments
 (0)