File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Sources/InAppSettingsKit/Controllers Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -175,8 +175,14 @@ - (void)viewDidLoad {
175175 self.webView = [[WKWebView alloc ] initWithFrame: CGRectZero configuration: self .webViewConfiguration];
176176 self.webView .translatesAutoresizingMaskIntoConstraints = NO ; // Disable autoresizing mask for layout constraints
177177 self.webView .navigationDelegate = self;
178-
179- // Set other Xcode Interface Builder properties directly on webView:
178+ self.webView .opaque = NO ;
179+ if (@available (iOS 13.0 , *)) {
180+ self.webView .backgroundColor = UIColor.systemBackgroundColor ;
181+ self.webView .backgroundColor = UIColor.systemBackgroundColor ;
182+ self.webView .scrollView .backgroundColor = UIColor.systemBackgroundColor ;
183+ } else {
184+ self.webView .backgroundColor = UIColor.whiteColor ;
185+ }
180186 self.webView .allowsBackForwardNavigationGestures = YES ; // Interaction: Back/Forward Gestures
181187 if (@available (iOS 16.0 , *)) {
182188 self.webView .findInteractionEnabled = YES ; // Interaction: Find & Replace
@@ -357,6 +363,8 @@ - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigat
357363 self.title = self.customTitle .length ? self.customTitle : result;
358364 }];
359365
366+ self.webView .scrollView .backgroundColor = nil ;
367+ self.webView .opaque = YES ;
360368
361369 // Update button states when loading finishes:
362370 [self updateNavigationButtons ];
You can’t perform that action at this time.
0 commit comments