Browse Source

support null background.color

yogevbd 6 years ago
parent
commit
850e98cd76
1 changed files with 1 additions and 3 deletions
  1. 1
    3
      lib/ios/RNNBackgroundOptions.m

+ 1
- 3
lib/ios/RNNBackgroundOptions.m View File

@@ -3,11 +3,9 @@
3 3
 @implementation RNNBackgroundOptions
4 4
 
5 5
 - (void)applyOn:(UIViewController *)viewController {
6
-	if (self.color) {
6
+	if (self.color && ![self.color isKindOfClass:[NSNull class]]) {
7 7
 		UIColor* backgroundColor = [RCTConvert UIColor:self.color];
8 8
 		viewController.navigationController.navigationBar.barTintColor = backgroundColor;
9
-	} else {
10
-		viewController.navigationController.navigationBar.barTintColor = nil;
11 9
 	}
12 10
 }
13 11