Przeglądaj źródła

fix(iOS): inconsistent backgroundColor (#868)

* fix inconsistent backgroundColor

* remove redundant setBackgroundColor
Wilson 5 lat temu
rodzic
commit
d25b20ac03
1 zmienionych plików z 1 dodań i 4 usunięć
  1. 1
    4
      ios/RNCWebView.m

+ 1
- 4
ios/RNCWebView.m Wyświetl plik

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