Browse Source

fix(iOS): inconsistent backgroundColor (#868)

* fix inconsistent backgroundColor

* remove redundant setBackgroundColor
Wilson 4 years ago
parent
commit
d25b20ac03
1 changed files with 1 additions and 4 deletions
  1. 1
    4
      ios/RNCWebView.m

+ 1
- 4
ios/RNCWebView.m View File

222
     }
222
     }
223
 
223
 
224
     _webView = [[WKWebView alloc] initWithFrame:self.bounds configuration: wkWebViewConfig];
224
     _webView = [[WKWebView alloc] initWithFrame:self.bounds configuration: wkWebViewConfig];
225
+    [self setBackgroundColor: _savedBackgroundColor];
225
     _webView.scrollView.delegate = self;
226
     _webView.scrollView.delegate = self;
226
     _webView.UIDelegate = self;
227
     _webView.UIDelegate = self;
227
     _webView.navigationDelegate = self;
228
     _webView.navigationDelegate = self;
838
     }];
839
     }];
839
     _onLoadingError(event);
840
     _onLoadingError(event);
840
   }
841
   }
841
-
842
-  [self setBackgroundColor: _savedBackgroundColor];
843
 }
842
 }
844
 
843
 
845
 - (void)evaluateJS:(NSString *)js
844
 - (void)evaluateJS:(NSString *)js
874
   } else if (_onLoadingFinish) {
873
   } else if (_onLoadingFinish) {
875
     _onLoadingFinish([self baseEvent]);
874
     _onLoadingFinish([self baseEvent]);
876
   }
875
   }
877
-
878
-  [self setBackgroundColor: _savedBackgroundColor];
879
 }
876
 }
880
 
877
 
881
 - (void)injectJavaScript:(NSString *)script
878
 - (void)injectJavaScript:(NSString *)script