Skip to content

Commit

Permalink
Set the background color of KlarnaStandaloneWebView to transparent on…
Browse files Browse the repository at this point in the history
… the iOS side
  • Loading branch information
MasoudFallahpourbaee committed Jun 10, 2024
1 parent 9526c8a commit ec1cefd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ios/Sources/view/oldarch/KlarnaStandaloneWebViewWrapper.mm
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ - (void)initializeKlarnaStandaloneWebView {
self.klarnaStandaloneWebView.translatesAutoresizingMaskIntoConstraints = NO;

[self addSubview:self.klarnaStandaloneWebView];

self.klarnaStandaloneWebView.backgroundColor = [UIColor clearColor];
for (UIView *subview in self.klarnaStandaloneWebView.subviews) {
if ([subview isKindOfClass:[WKWebView class]]) {
NSLog(@"Setting the background color of WKWebView to transparent...");
subview.backgroundColor = [UIColor clearColor];
}
}

[NSLayoutConstraint activateConstraints:[[NSArray alloc] initWithObjects:
[self.klarnaStandaloneWebView.topAnchor constraintEqualToAnchor:self.topAnchor],
Expand Down

0 comments on commit ec1cefd

Please sign in to comment.