Inbox View
CleverPush Inbox View
You can also implement CleverPush InboxView into your application. Inbox View will come up with the package of the all the notification you have recieved with the CleverPush. To use the InboxView you will need to use the sample code as described below.
import CleverPush
let inboxView = CPInboxView(frame: CGRect(x: 0.0, y: 0, width: self.view.frame.size.width, height: self.view.frame.height ),
combine_with_api: true,
read_color: UIColor.white,
unread_color: UIColor.lightGray,
notification_text_color: UIColor.black,
notification_text_font_family: "AppleSDGothicNeo-Reguler",
notification_text_size: 17,
date_text_color: UIColor.black,
date_text_font_family: "AppleSDGothicNeo-Bold",
date_text_size: 12,
divider_colour: UIColor.black)
self.view.addSubview(inboxView!)
#import <CleverPush/CPInboxView.h>
CPInboxView *inboxView = [[CPInboxView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)
combine_with_api:YES
read_color:UIColor.whiteColor
unread_color:UIColor.lightGrayColor
notification_text_color:UIColor.blackColor
notification_text_font_family:@"AppleSDGothicNeo-Reguler"
notification_text_size:17
date_text_color:UIColor.blackColor
date_text_font_family:@"AppleSDGothicNeo-Reguler"
date_text_size:12
divider_colour:UIColor.blackColor];
[self.view addSubview:inboxView];
You can then get the callback events when you tapped on the any of the index from the list.
inboxView?.notificationClickCallback({ result in
print(result as Any)
})
[inboxView notificationClickCallback:^(CPNotification *result) {
NSLog(@"%@", result);
}];
Here is how the InboxView will looks.