File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
OneSignalInAppMessages/UI Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 141141#define FALLBACK_TO_SETTINGS_MESSAGE @" Onesignal_settings_fallback_message"
142142#define ONESIGNAL_SUPRESS_LAUNCH_URLS @" OneSignal_suppress_launch_urls"
143143#define ONESIGNAL_IN_APP_HIDE_DROP_SHADOW @" OneSignal_in_app_message_hide_drop_shadow"
144+ #define ONESIGNAL_IN_APP_HIDE_GRAY_OVERLAY @" OneSignal_in_app_message_hide_gray_overlay"
144145
145146// GDPR Privacy Consent
146147#define GDPR_CONSENT_GRANTED @" GDPR_CONSENT_GRANTED"
Original file line number Diff line number Diff line change @@ -184,8 +184,17 @@ - (void)setupInitialMessageUI {
184184 // Only the center modal and full screen (both centered) IAM should have a dark background
185185 // So get the alpha based on the IAM being a banner or not
186186 double alphaBackground = [self .message isBanner ] ? 0.0 : 0.5 ;
187- [UIView animateWithDuration: 0.3 animations: ^{
187+
188+ // the plist value specifies whether the user wants to add a gray overlay to the In App Message
189+ NSDictionary *bundleDict = [[NSBundle mainBundle ] infoDictionary ];
190+ BOOL hideGrayOverlay = [bundleDict[ONESIGNAL_IN_APP_HIDE_GRAY_OVERLAY] boolValue ];
191+ if (hideGrayOverlay) {
192+ self.view .backgroundColor = [UIColor clearColor ];
193+ } else {
188194 self.view .backgroundColor = [UIColor colorWithRed: 0.0 green: 0.0 blue: 0.0 alpha: alphaBackground];
195+ }
196+
197+ [UIView animateWithDuration: 0.3 animations: ^{
189198 self.view .alpha = 1.0 ;
190199 } completion: ^(BOOL finished) {
191200 if (!finished)
You can’t perform that action at this time.
0 commit comments