1010#import < UIKit/UIKit.h>
1111
1212#import " IterableInAppManager.h"
13- #import " IterableConstants.h"
14- #import " IterableNotificationMetadata.h"
1513#import " IterableInAppHTMLViewController.h"
1614#import " IterableLogging.h"
1715
@@ -31,7 +29,7 @@ @implementation IterableInAppManager
3129static NSString *const IN_APP_AUTO_EXPAND = @" AutoExpand" ;
3230
3331// documented in IterableInAppManager.h
34- +(void ) showIterableNotificationHTML : (NSString *)htmlString trackParams : (IterableNotificationMetadata*)trackParams callbackBlock : (ITEActionBlock)callbackBlock backgroundAlpha : (double )backgroundAlpha padding : (UIEdgeInsets)padding {
32+ +(BOOL ) showIterableNotificationHTML : (NSString *)htmlString trackParams : (IterableNotificationMetadata*)trackParams callbackBlock : (ITEActionBlock)callbackBlock backgroundAlpha : (double )backgroundAlpha padding : (UIEdgeInsets)padding {
3533 if (htmlString != NULL ) {
3634 UIViewController *topViewController = [UIApplication sharedApplication ].delegate .window .rootViewController ;
3735 if ([topViewController isKindOfClass: [UIViewController class ]])
@@ -44,7 +42,7 @@ +(void) showIterableNotificationHTML:(NSString*)htmlString trackParams:(Iterable
4442
4543 if ([topViewController isKindOfClass: [IterableInAppHTMLViewController class ]]) {
4644 LogWarning (@" Skipping the in-app notification: another notification is already being displayed" );
47- return ;
45+ return NO ;
4846 }
4947
5048 IterableInAppHTMLViewController *baseNotification;
@@ -54,10 +52,13 @@ +(void) showIterableNotificationHTML:(NSString*)htmlString trackParams:(Iterable
5452 [baseNotification ITESetPadding: padding];
5553
5654 topViewController.definesPresentationContext = YES ;
57- baseNotification.view .backgroundColor = [UIColor colorWithWhite: 0 alpha: backgroundAlpha];;
55+ baseNotification.view .backgroundColor = [UIColor colorWithWhite: 0 alpha: backgroundAlpha];
5856 baseNotification.modalPresentationStyle = UIModalPresentationOverCurrentContext;
5957
6058 [topViewController presentViewController: baseNotification animated: NO completion: nil ];
59+ return YES ;
60+ } else {
61+ return NO ;
6162 }
6263}
6364
0 commit comments