Skip to content

Commit bbae74e

Browse files
author
tiagomartinho
committed
adds API to set timeText in banner
1 parent a87b9f2 commit bbae74e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

EBForeNotification/Classes/EBForeNotification.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#import "EBMuteDetector.h"
1515

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

1819
@implementation EBForeNotification
1920

@@ -45,6 +46,10 @@ +(void)handleRemoteNotification:(NSDictionary*)userInfo soundID:(int)soundID isI
4546
}
4647
}
4748

49+
+(void)setBannerViewTimeText:(NSString*)timeText {
50+
EBBannerViewTimeText = timeText;
51+
}
52+
4853
#pragma mark - private
4954

5055
+(void)showBannerWithUserInfo:(NSDictionary*)userInfo soundID:(int)soundID isIos10:(BOOL)isIos10{

EBForeNotification/EBForeNotification.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@
66
#import <Foundation/Foundation.h>
77

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

1011
@interface EBForeNotification : NSObject
1112
+(void)handleRemoteNotification:(NSDictionary*)userInfo soundID:(int)soundID;
1213
+(void)handleRemoteNotification:(NSDictionary*)userInfo customSound:(NSString*)soundName;
1314
+(void)handleRemoteNotification:(NSDictionary*)userInfo soundID:(int)soundID isIos10:(BOOL)isIos10;
1415
+(void)handleRemoteNotification:(NSDictionary*)userInfo customSound:(NSString*)soundName isIos10:(BOOL)isIos10;
16+
+(void)setBannerViewTimeText:(NSString*)timeText;
1517
@end
1618

17-
static NSString *const EBBannerViewTimeText = @"现在"; //默认弹窗时间 default banner time
18-
19-
2019
/*
2120
2221
⭐1.在 AppDelegate.m 中,调用示例如下:
@@ -189,4 +188,4 @@ static NSString *const EBBannerViewTimeText = @"现在"; //默认弹窗时间
189188
4095 - - Vibrate There was no category for this sound before 2.2.
190189
In the SDK this is the constant kSystemSoundID_Vibrate.
191190
192-
*/
191+
*/

0 commit comments

Comments
 (0)