Skip to content

Commit 44c56f5

Browse files
committed
Enable Transparent IAM backgrounds
In order to support transparent IAM backgrounds we must set the WebView to not opaque and set the background color to clear. We are always doing this since the HTML will set its own background color unless it is specified as clear by the IAM's creator.
1 parent 445fdde commit 44c56f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

iOS_SDK/OneSignalSDK/Source/OSInAppMessageView.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ - (void)setupWebviewWithMessageHandler:(id<WKScriptMessageHandler>)handler {
111111

112112
// Setup WebView, delegates, and disable scrolling inside of the WebView
113113
self.webView = [[WKWebView alloc] initWithFrame:mainBounds configuration:configuration];
114-
114+
self.webView.backgroundColor = [UIColor clearColor];
115+
self.webView.opaque = NO;
115116
[self addSubview:self.webView];
116117

117118
[self layoutIfNeeded];

0 commit comments

Comments
 (0)