Skip to content

Commit

Permalink
adds API to set timeText in banner
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagomartinho committed Nov 14, 2016
1 parent a87b9f2 commit bbae74e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions EBForeNotification/Classes/EBForeNotification.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#import "EBMuteDetector.h"

NSString *const EBBannerViewDidClick = @"EBBannerViewDidClick";
NSString *EBBannerViewTimeText = @"现在"; //默认弹窗时间 default banner time

@implementation EBForeNotification

Expand Down Expand Up @@ -45,6 +46,10 @@ +(void)handleRemoteNotification:(NSDictionary*)userInfo soundID:(int)soundID isI
}
}

+(void)setBannerViewTimeText:(NSString*)timeText {
EBBannerViewTimeText = timeText;
}

#pragma mark - private

+(void)showBannerWithUserInfo:(NSDictionary*)userInfo soundID:(int)soundID isIos10:(BOOL)isIos10{
Expand Down
7 changes: 3 additions & 4 deletions EBForeNotification/EBForeNotification.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
#import <Foundation/Foundation.h>

extern NSString *const EBBannerViewDidClick; //监听点击弹窗的事件
extern NSString *EBBannerViewTimeText; //默认弹窗时间 default banner time

@interface EBForeNotification : NSObject
+(void)handleRemoteNotification:(NSDictionary*)userInfo soundID:(int)soundID;
+(void)handleRemoteNotification:(NSDictionary*)userInfo customSound:(NSString*)soundName;
+(void)handleRemoteNotification:(NSDictionary*)userInfo soundID:(int)soundID isIos10:(BOOL)isIos10;
+(void)handleRemoteNotification:(NSDictionary*)userInfo customSound:(NSString*)soundName isIos10:(BOOL)isIos10;
+(void)setBannerViewTimeText:(NSString*)timeText;
@end

static NSString *const EBBannerViewTimeText = @"现在"; //默认弹窗时间 default banner time


/*
⭐1.在 AppDelegate.m 中,调用示例如下:
Expand Down Expand Up @@ -189,4 +188,4 @@ static NSString *const EBBannerViewTimeText = @"现在"; //默认弹窗时间
4095 - - Vibrate There was no category for this sound before 2.2.
In the SDK this is the constant kSystemSoundID_Vibrate.
*/
*/

0 comments on commit bbae74e

Please sign in to comment.