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 @@ -189,8 +189,17 @@ - (void)setupInitialMessageUI {
189189 // Only the center modal and full screen (both centered) IAM should have a dark background
190190 // So get the alpha based on the IAM being a banner or not
191191 double alphaBackground = [self .message isBanner ] ? 0.0 : 0.5 ;
192- [UIView animateWithDuration: 0.3 animations: ^{
192+
193+ // the plist value specifies whether the user wants to add a gray overlay to the In App Message
194+ NSDictionary *bundleDict = [[NSBundle mainBundle ] infoDictionary ];
195+ BOOL hideGrayOverlay = [bundleDict[ONESIGNAL_IN_APP_HIDE_GRAY_OVERLAY] boolValue ];
196+ if (hideGrayOverlay) {
197+ self.view .backgroundColor = [UIColor clearColor ];
198+ } else {
193199 self.view .backgroundColor = [UIColor colorWithRed: 0.0 green: 0.0 blue: 0.0 alpha: alphaBackground];
200+ }
201+
202+ [UIView animateWithDuration: 0.3 animations: ^{
194203 self.view .alpha = 1.0 ;
195204 } completion: ^(BOOL finished) {
196205 if (!finished)
You can’t perform that action at this time.
0 commit comments