This repository was archived by the owner on Apr 16, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments