Browse Source

[BREAKING] Top bar options changes (#4040)

* Removed topBar.transparent and added transparent color support for topBar.background.color

* fix unit tests
Yogev Ben David 6 years ago
parent
commit
37882ab179
No account linked to committer's email address

+ 9
- 3
docs/docs/options-migration.md View File

145
 
145
 
146
 ```js
146
 ```js
147
 topBar: {
147
 topBar: {
148
-  transparent: true
148
+  background: {
149
+    color: 'transparent'
150
+  }
149
 }  
151
 }  
150
 ```
152
 ```
151
 
153
 
417
 
419
 
418
 ```js
420
 ```js
419
 topBar: {
421
 topBar: {
420
-  translucent: true
422
+  background: {
423
+    translucent: true
424
+  }
421
 }
425
 }
422
 ```
426
 ```
423
 
427
 
435
 
439
 
436
 ```js
440
 ```js
437
 topBar: {
441
 topBar: {
438
-  blur: true
442
+  background: {
443
+    blur: true
444
+  }
439
 }  
445
 }  
440
 ```
446
 ```
441
 
447
 

+ 4
- 3
docs/docs/styling.md View File

169
   rootBackgroundImage: require('rootBackground.png'),
169
   rootBackgroundImage: require('rootBackground.png'),
170
   topBar: {
170
   topBar: {
171
     barStyle: 'default' | 'black',
171
     barStyle: 'default' | 'black',
172
-    translucent: true,
173
-    transparent: false,
172
+    background: {
173
+      translucent: true,
174
+      blur: false
175
+    }
174
     noBorder: false,
176
     noBorder: false,
175
-    blur: false,
176
     backButton: {
177
     backButton: {
177
       title: 'Back',
178
       title: 'Back',
178
       showTitle: false
179
       showTitle: false

+ 2
- 0
lib/ios/RNNBackgroundOptions.h View File

4
 @interface RNNBackgroundOptions : RNNOptions
4
 @interface RNNBackgroundOptions : RNNOptions
5
 
5
 
6
 @property (nonatomic, strong) NSNumber* color;
6
 @property (nonatomic, strong) NSNumber* color;
7
+@property (nonatomic, strong) NSNumber* translucent;
8
+@property (nonatomic, strong) NSNumber* blur;
7
 @property (nonatomic, strong) RNNComponentOptions* component;
9
 @property (nonatomic, strong) RNNComponentOptions* component;
8
 @property (nonatomic, strong) NSNumber* clipToBounds; 
10
 @property (nonatomic, strong) NSNumber* clipToBounds; 
9
 
11
 

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

1
 #import "RNNBackgroundOptions.h"
1
 #import "RNNBackgroundOptions.h"
2
 
2
 
3
+extern const NSInteger BLUR_TOPBAR_TAG;
4
+const NSInteger TOP_BAR_TRANSPARENT_TAG = 78264803;
5
+
6
+@interface RNNBackgroundOptions()
7
+
8
+@property (nonatomic, strong) NSMutableDictionary* originalTopBarImages;
9
+
10
+@end
11
+
3
 @implementation RNNBackgroundOptions
12
 @implementation RNNBackgroundOptions
4
 
13
 
5
 - (void)applyOnNavigationController:(UINavigationController *)navigationController {
14
 - (void)applyOnNavigationController:(UINavigationController *)navigationController {
15
+	if (self.translucent) {
16
+		navigationController.navigationBar.translucent = [self.translucent boolValue];
17
+	} else {
18
+		navigationController.navigationBar.translucent = NO;
19
+	}
20
+	
21
+	if ([self.blur boolValue]) {
22
+		if (![navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]) {
23
+
24
+			[navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
25
+			navigationController.navigationBar.shadowImage = [UIImage new];
26
+			UIVisualEffectView *blur = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
27
+			CGRect statusBarFrame = [[UIApplication sharedApplication] statusBarFrame];
28
+			blur.frame = CGRectMake(0, -1 * statusBarFrame.size.height, navigationController.navigationBar.frame.size.width, navigationController.navigationBar.frame.size.height + statusBarFrame.size.height);
29
+			blur.userInteractionEnabled = NO;
30
+			blur.tag = BLUR_TOPBAR_TAG;
31
+			[navigationController.navigationBar insertSubview:blur atIndex:0];
32
+			[navigationController.navigationBar sendSubviewToBack:blur];
33
+		}
34
+	} else {
35
+		UIView *blur = [navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG];
36
+		if (blur) {
37
+			[navigationController.navigationBar setBackgroundImage: nil forBarMetrics:UIBarMetricsDefault];
38
+			navigationController.navigationBar.shadowImage = nil;
39
+			[blur removeFromSuperview];
40
+		}
41
+	}
42
+	
6
 	if (self.color && ![self.color isKindOfClass:[NSNull class]]) {
43
 	if (self.color && ![self.color isKindOfClass:[NSNull class]]) {
7
 		UIColor* backgroundColor = [RCTConvert UIColor:self.color];
44
 		UIColor* backgroundColor = [RCTConvert UIColor:self.color];
8
-		navigationController.navigationBar.barTintColor = backgroundColor;
45
+
46
+		CGFloat bgColorAlpha = CGColorGetAlpha(backgroundColor.CGColor);
47
+
48
+		if (bgColorAlpha == 0.0) {
49
+			if (![navigationController.navigationBar viewWithTag:TOP_BAR_TRANSPARENT_TAG]){
50
+				[self storeOriginalTopBarImages:navigationController];
51
+				UIView *transparentView = [[UIView alloc] initWithFrame:CGRectZero];
52
+				transparentView.backgroundColor = [UIColor clearColor];
53
+				transparentView.tag = TOP_BAR_TRANSPARENT_TAG;
54
+				[navigationController.navigationBar insertSubview:transparentView atIndex:0];
55
+			}
56
+			navigationController.navigationBar.translucent = YES;
57
+			[navigationController.navigationBar setBackgroundColor:[UIColor clearColor]];
58
+			navigationController.navigationBar.shadowImage = [UIImage new];
59
+			[navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
60
+		} else {
61
+			navigationController.navigationBar.barTintColor = backgroundColor;
62
+			UIView *transparentView = [navigationController.navigationBar viewWithTag:TOP_BAR_TRANSPARENT_TAG];
63
+			if (transparentView){
64
+				[transparentView removeFromSuperview];
65
+				[navigationController.navigationBar setBackgroundImage:self.originalTopBarImages[@"backgroundImage"] forBarMetrics:UIBarMetricsDefault];
66
+				navigationController.navigationBar.shadowImage = self.originalTopBarImages[@"shadowImage"];
67
+				self.originalTopBarImages = nil;
68
+			}
69
+		}
70
+	} else {
71
+		UIView *transparentView = [navigationController.navigationBar viewWithTag:TOP_BAR_TRANSPARENT_TAG];
72
+		if (transparentView){
73
+			[transparentView removeFromSuperview];
74
+			[navigationController.navigationBar setBackgroundImage:self.originalTopBarImages[@"backgroundImage"] forBarMetrics:UIBarMetricsDefault];
75
+			navigationController.navigationBar.shadowImage = self.originalTopBarImages[@"shadowImage"];
76
+			self.originalTopBarImages = nil;
77
+		}
78
+	}
79
+}
80
+
81
+- (void)storeOriginalTopBarImages:(UINavigationController *)navigationController {
82
+	NSMutableDictionary *originalTopBarImages = [@{} mutableCopy];
83
+	UIImage *bgImage = [navigationController.navigationBar backgroundImageForBarMetrics:UIBarMetricsDefault];
84
+	if (bgImage != nil) {
85
+		originalTopBarImages[@"backgroundImage"] = bgImage;
86
+	}
87
+	UIImage *shadowImage = navigationController.navigationBar.shadowImage;
88
+	if (shadowImage != nil) {
89
+		originalTopBarImages[@"shadowImage"] = shadowImage;
9
 	}
90
 	}
91
+	self.originalTopBarImages = originalTopBarImages;
10
 }
92
 }
11
 
93
 
12
 @end
94
 @end

+ 0
- 3
lib/ios/RNNTopBarOptions.h View File

18
 @property (nonatomic, strong) NSNumber* leftButtonDisabledColor;
18
 @property (nonatomic, strong) NSNumber* leftButtonDisabledColor;
19
 @property (nonatomic, strong) NSNumber* rightButtonDisabledColor;
19
 @property (nonatomic, strong) NSNumber* rightButtonDisabledColor;
20
 @property (nonatomic, strong) NSString* barStyle;
20
 @property (nonatomic, strong) NSString* barStyle;
21
-@property (nonatomic, strong) NSNumber* translucent;
22
-@property (nonatomic, strong) NSNumber* transparent;
23
 @property (nonatomic, strong) NSNumber* drawBehind;
21
 @property (nonatomic, strong) NSNumber* drawBehind;
24
 @property (nonatomic, strong) NSNumber* noBorder;
22
 @property (nonatomic, strong) NSNumber* noBorder;
25
-@property (nonatomic, strong) NSNumber* blur;
26
 @property (nonatomic, strong) NSNumber* animate;
23
 @property (nonatomic, strong) NSNumber* animate;
27
 @property (nonatomic, strong) NSString* testID;
24
 @property (nonatomic, strong) NSString* testID;
28
 @property (nonatomic, strong) RNNLargeTitleOptions* largeTitle;
25
 @property (nonatomic, strong) RNNLargeTitleOptions* largeTitle;

+ 1
- 73
lib/ios/RNNTopBarOptions.m View File

2
 #import "RNNNavigationButtons.h"
2
 #import "RNNNavigationButtons.h"
3
 #import "RNNCustomTitleView.h"
3
 #import "RNNCustomTitleView.h"
4
 
4
 
5
-extern const NSInteger BLUR_TOPBAR_TAG;
6
-const NSInteger TOP_BAR_TRANSPARENT_TAG = 78264803;
7
-
8
-
9
 @interface RNNTopBarOptions ()
5
 @interface RNNTopBarOptions ()
10
 
6
 
11
-@property (nonatomic, strong) NSMutableDictionary* originalTopBarImages;
12
 @property (nonatomic, strong) RNNNavigationButtons* navigationButtons;
7
 @property (nonatomic, strong) RNNNavigationButtons* navigationButtons;
13
 
8
 
14
 @end
9
 @end
75
 }
70
 }
76
 
71
 
77
 - (void)applyOnNavigationController:(UINavigationController *)navigationController {
72
 - (void)applyOnNavigationController:(UINavigationController *)navigationController {
78
-	[self.background applyOnNavigationController:navigationController];
79
 	if (self.testID) {
73
 	if (self.testID) {
80
 		navigationController.navigationBar.accessibilityIdentifier = self.testID;
74
 		navigationController.navigationBar.accessibilityIdentifier = self.testID;
81
 	}
75
 	}
102
 		}
96
 		}
103
 	}
97
 	}
104
 	
98
 	
105
-	if ([self.blur boolValue]) {
106
-		if (![navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]) {
107
-			
108
-			[navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
109
-			navigationController.navigationBar.shadowImage = [UIImage new];
110
-			UIVisualEffectView *blur = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
111
-			CGRect statusBarFrame = [[UIApplication sharedApplication] statusBarFrame];
112
-			blur.frame = CGRectMake(0, -1 * statusBarFrame.size.height, navigationController.navigationBar.frame.size.width, navigationController.navigationBar.frame.size.height + statusBarFrame.size.height);
113
-			blur.userInteractionEnabled = NO;
114
-			blur.tag = BLUR_TOPBAR_TAG;
115
-			[navigationController.navigationBar insertSubview:blur atIndex:0];
116
-			[navigationController.navigationBar sendSubviewToBack:blur];
117
-		}
118
-	} else {
119
-		UIView *blur = [navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG];
120
-		if (blur) {
121
-			[navigationController.navigationBar setBackgroundImage: nil forBarMetrics:UIBarMetricsDefault];
122
-			navigationController.navigationBar.shadowImage = nil;
123
-			[blur removeFromSuperview];
124
-		}
125
-	}
126
-	
127
-	void (^disableTopBarTransparent)(void) = ^ {
128
-		UIView *transparentView = [navigationController.navigationBar viewWithTag:TOP_BAR_TRANSPARENT_TAG];
129
-		if (transparentView){
130
-			[transparentView removeFromSuperview];
131
-			[navigationController.navigationBar setBackgroundImage:self.originalTopBarImages[@"backgroundImage"] forBarMetrics:UIBarMetricsDefault];
132
-			navigationController.navigationBar.shadowImage = self.originalTopBarImages[@"shadowImage"];
133
-			self.originalTopBarImages = nil;
134
-		}
135
-	};
136
-	
137
-	if (self.transparent) {
138
-		if ([self.transparent boolValue]) {
139
-			if (![navigationController.navigationBar viewWithTag:TOP_BAR_TRANSPARENT_TAG]){
140
-				[self storeOriginalTopBarImages:navigationController];
141
-				[navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
142
-				navigationController.navigationBar.shadowImage = [UIImage new];
143
-				UIView *transparentView = [[UIView alloc] initWithFrame:CGRectZero];
144
-				transparentView.tag = TOP_BAR_TRANSPARENT_TAG;
145
-				[navigationController.navigationBar insertSubview:transparentView atIndex:0];
146
-			}
147
-		} else {
148
-			disableTopBarTransparent();
149
-		}
150
-	} else {
151
-		disableTopBarTransparent();
152
-	}
153
-	
154
 	if (self.barStyle) {
99
 	if (self.barStyle) {
155
 		navigationController.navigationBar.barStyle = [RCTConvert UIBarStyle:self.barStyle];
100
 		navigationController.navigationBar.barStyle = [RCTConvert UIBarStyle:self.barStyle];
156
 	} else {
101
 	} else {
157
 		navigationController.navigationBar.barStyle = UIBarStyleDefault;
102
 		navigationController.navigationBar.barStyle = UIBarStyleDefault;
158
 	}
103
 	}
159
 	
104
 	
160
-	if (self.translucent) {
161
-		navigationController.navigationBar.translucent = [self.translucent boolValue];
162
-	} else {
163
-		navigationController.navigationBar.translucent = NO;
164
-	}
105
+	[self.background applyOnNavigationController:navigationController];
165
 }
106
 }
166
 
107
 
167
 - (void)setRightButtonColor:(NSNumber *)rightButtonColor {
108
 - (void)setRightButtonColor:(NSNumber *)rightButtonColor {
212
 	}
153
 	}
213
 }
154
 }
214
 
155
 
215
--(void)storeOriginalTopBarImages:(UINavigationController *)navigationController {
216
-	NSMutableDictionary *originalTopBarImages = [@{} mutableCopy];
217
-	UIImage *bgImage = [navigationController.navigationBar backgroundImageForBarMetrics:UIBarMetricsDefault];
218
-	if (bgImage != nil) {
219
-		originalTopBarImages[@"backgroundImage"] = bgImage;
220
-	}
221
-	UIImage *shadowImage = navigationController.navigationBar.shadowImage;
222
-	if (shadowImage != nil) {
223
-		originalTopBarImages[@"shadowImage"] = shadowImage;
224
-	}
225
-	self.originalTopBarImages = originalTopBarImages;
226
-}
227
-
228
 @end
156
 @end

+ 7
- 13
lib/ios/ReactNativeNavigationTests/RNNRootViewControllerTest.m View File

179
 
179
 
180
 -(void)testTopBarTranslucent {
180
 -(void)testTopBarTranslucent {
181
 	NSNumber* topBarTranslucentInput = @(0);
181
 	NSNumber* topBarTranslucentInput = @(0);
182
-	self.options.topBar.translucent = topBarTranslucentInput;
182
+	self.options.topBar.background.translucent = topBarTranslucentInput;
183
 	__unused RNNNavigationController* nav = [self createNavigationController];
183
 	__unused RNNNavigationController* nav = [self createNavigationController];
184
 	[self.uut viewWillAppear:false];
184
 	[self.uut viewWillAppear:false];
185
 	XCTAssertFalse(self.uut.navigationController.navigationBar.translucent);
185
 	XCTAssertFalse(self.uut.navigationController.navigationBar.translucent);
200
 }
200
 }
201
 
201
 
202
 -(void)testTopBarTransparent_BOOL_True {
202
 -(void)testTopBarTransparent_BOOL_True {
203
-	NSNumber* topBarTransparentInput = @(1);
204
-	self.options.topBar.transparent = topBarTransparentInput;
203
+	NSNumber* transparentColor = @(0x00000000);
204
+	self.options.topBar.background.color = transparentColor;
205
 	__unused RNNNavigationController* nav = [self createNavigationController];
205
 	__unused RNNNavigationController* nav = [self createNavigationController];
206
 	[self.uut viewWillAppear:false];
206
 	[self.uut viewWillAppear:false];
207
 	UIView* transparentView = [self.uut.navigationController.navigationBar viewWithTag:TOP_BAR_TRANSPARENT_TAG];
207
 	UIView* transparentView = [self.uut.navigationController.navigationBar viewWithTag:TOP_BAR_TRANSPARENT_TAG];
210
 }
210
 }
211
 
211
 
212
 -(void)testTopBarTransparent_BOOL_false {
212
 -(void)testTopBarTransparent_BOOL_false {
213
-	NSNumber* topBarTransparentInput = @(0);
213
+	NSNumber* inputColor = @(0xFFFF0000);
214
 	__unused RNNNavigationController* nav = [self createNavigationController];
214
 	__unused RNNNavigationController* nav = [self createNavigationController];
215
-	self.options.topBar.transparent = topBarTransparentInput;
215
+	self.options.topBar.background.color = inputColor;
216
 	[self.uut viewWillAppear:false];
216
 	[self.uut viewWillAppear:false];
217
 	UIView* transparentView = [self.uut.navigationController.navigationBar viewWithTag:TOP_BAR_TRANSPARENT_TAG];
217
 	UIView* transparentView = [self.uut.navigationController.navigationBar viewWithTag:TOP_BAR_TRANSPARENT_TAG];
218
 	XCTAssertFalse(transparentView);
218
 	XCTAssertFalse(transparentView);
219
 }
219
 }
220
 
220
 
221
-
222
--(void)testStoreOriginalTopBarImages {
223
-
224
-}
225
-
226
-
227
 -(void)testTopBarLargeTitle_default {
221
 -(void)testTopBarLargeTitle_default {
228
 	__unused RNNNavigationController* nav = [self createNavigationController];
222
 	__unused RNNNavigationController* nav = [self createNavigationController];
229
 	[self.uut viewWillAppear:false];
223
 	[self.uut viewWillAppear:false];
564
 
558
 
565
 -(void)testTopBarBlur_false {
559
 -(void)testTopBarBlur_false {
566
 	NSNumber* topBarBlurInput = @(0);
560
 	NSNumber* topBarBlurInput = @(0);
567
-	self.options.topBar.blur = topBarBlurInput;
561
+	self.options.topBar.background.blur = topBarBlurInput;
568
 	__unused RNNNavigationController* nav = [self createNavigationController];
562
 	__unused RNNNavigationController* nav = [self createNavigationController];
569
 	[self.uut viewWillAppear:false];
563
 	[self.uut viewWillAppear:false];
570
 	XCTAssertNil([self.uut.navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]);
564
 	XCTAssertNil([self.uut.navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]);
572
 
566
 
573
 -(void)testTopBarBlur_true {
567
 -(void)testTopBarBlur_true {
574
 	NSNumber* topBarBlurInput = @(1);
568
 	NSNumber* topBarBlurInput = @(1);
575
-	self.options.topBar.blur = topBarBlurInput;
569
+	self.options.topBar.background.blur = topBarBlurInput;
576
 	__unused RNNNavigationController* nav = [self createNavigationController];
570
 	__unused RNNNavigationController* nav = [self createNavigationController];
577
 	[self.uut viewWillAppear:false];
571
 	[self.uut viewWillAppear:false];
578
 	XCTAssertNotNil([self.uut.navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]);
572
 	XCTAssertNotNil([self.uut.navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]);

+ 10
- 17
lib/src/interfaces/Options.ts View File

194
   component?: {
194
   component?: {
195
     name?: string;
195
     name?: string;
196
   };
196
   };
197
+  /**
198
+   * Allows the NavBar to be translucent (blurred)
199
+   * #### (iOS specific)
200
+   */
201
+  translucent?: boolean;
202
+  /**
203
+   * Enable background blur
204
+   * #### (iOS specific)
205
+   */
206
+  blur?: boolean;
197
 }
207
 }
198
 
208
 
199
 export interface OptionsTopBarButton {
209
 export interface OptionsTopBarButton {
294
    * @default 'default'
304
    * @default 'default'
295
    */
305
    */
296
   barStyle?: 'default' | 'black';
306
   barStyle?: 'default' | 'black';
297
-  /**
298
-   * Allows the NavBar to be translucent (blurred)
299
-   * #### (iOS specific)
300
-   * @requires transparent: false
301
-   */
302
-  translucent?: boolean;
303
-  /**
304
-   * Allows the NavBar to be transparent
305
-   * #### (iOS specific)
306
-   */
307
-  transparent?: boolean;
308
   /**
307
   /**
309
    * Disable the border on bottom of the navbar
308
    * Disable the border on bottom of the navbar
310
    * #### (iOS specific)
309
    * #### (iOS specific)
311
    * @default false
310
    * @default false
312
    */
311
    */
313
   noBorder?: boolean;
312
   noBorder?: boolean;
314
-  /**
315
-   * Enable background blur
316
-   * #### (iOS specific)
317
-   */
318
-  blur?: boolean;
319
   /**
313
   /**
320
    * Show a UISearchBar in the Top Bar
314
    * Show a UISearchBar in the Top Bar
321
    * #### (iOS 11+ specific)
315
    * #### (iOS 11+ specific)
397
   /**
391
   /**
398
    * Allows the Bottom Tabs to be translucent (blurred)
392
    * Allows the Bottom Tabs to be translucent (blurred)
399
    * #### (iOS specific)
393
    * #### (iOS specific)
400
-   * @requires transparent: false
401
    */
394
    */
402
   translucent?: boolean;
395
   translucent?: boolean;
403
   /**
396
   /**

+ 3
- 1
playground/src/screens/CustomTransitionOrigin.js View File

18
         largeTitle: {
18
         largeTitle: {
19
           visible: false
19
           visible: false
20
         },
20
         },
21
-        translucent: true
21
+        background: {
22
+          translucent: true
23
+        }
22
       }
24
       }
23
     };
25
     };
24
   }
26
   }

+ 6
- 2
playground/src/screens/OptionsScreen.js View File

219
   onClickTopBarTransparent = () => {
219
   onClickTopBarTransparent = () => {
220
     Navigation.mergeOptions(this.props.componentId, {
220
     Navigation.mergeOptions(this.props.componentId, {
221
       topBar: {
221
       topBar: {
222
-        transparent: true
222
+        background: {
223
+          color: 'transparent'
224
+        }
223
       }
225
       }
224
     });
226
     });
225
   }
227
   }
227
   onClickTopBarOpaque = () => {
229
   onClickTopBarOpaque = () => {
228
     Navigation.mergeOptions(this.props.componentId, {
230
     Navigation.mergeOptions(this.props.componentId, {
229
       topBar: {
231
       topBar: {
230
-        transparent: false
232
+        background: {
233
+          color: 'white'
234
+        }
231
       }
235
       }
232
     });
236
     });
233
   }
237
   }

+ 6
- 3
playground/src/screens/PushedScreen.js View File

20
           text: 'single',
20
           text: 'single',
21
           testID: testIDs.TOP_BAR_BUTTON
21
           testID: testIDs.TOP_BAR_BUTTON
22
         },
22
         },
23
+        background: {
24
+          color: 'blue'
25
+        },
23
         rightButtonColor: 'red',
26
         rightButtonColor: 'red',
24
       },
27
       },
25
-      layout: {
26
-        backgroundColor: '#f5fcff'
27
-      },
28
+      // layout: {
29
+      //   backgroundColor: '#f5fcff'
30
+      // },
28
       bottomTabs: {
31
       bottomTabs: {
29
         visible: false
32
         visible: false
30
       }
33
       }

+ 6
- 2
playground/src/screens/SearchScreen.js View File

27
           visible: true
27
           visible: true
28
         },
28
         },
29
         searchBar: true,
29
         searchBar: true,
30
-        translucent: true,
30
+        background: {
31
+          translucent: true
32
+        },
31
         searchBarPlaceholder: 'Start Typing'
33
         searchBarPlaceholder: 'Start Typing'
32
       }
34
       }
33
     };
35
     };
75
             largeTitle: {
77
             largeTitle: {
76
               visible: true
78
               visible: true
77
             },
79
             },
78
-            translucent: true,
80
+            background: {
81
+              translucent: true
82
+            }
79
           }
83
           }
80
         }
84
         }
81
       },
85
       },