瀏覽代碼

Fixes topBar.backgroundColor overrides topBar.noBorder

yogevbd 6 年之前
父節點
當前提交
7dfec40722
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. 2
    2
      lib/ios/RNNNavigationController.m

+ 2
- 2
lib/ios/RNNNavigationController.m 查看文件

@@ -125,8 +125,8 @@ const NSInteger TOP_BAR_TRANSPARENT_TAG = 78264803;
125 125
 		UIView *transparentView = [self.navigationBar viewWithTag:TOP_BAR_TRANSPARENT_TAG];
126 126
 		if (transparentView){
127 127
 			[transparentView removeFromSuperview];
128
-			[self.navigationBar setBackgroundImage:self.originalTopBarImages[@"backgroundImage"] forBarMetrics:UIBarMetricsDefault];
129
-			self.navigationBar.shadowImage = self.originalTopBarImages[@"shadowImage"];
128
+			[self.navigationBar setBackgroundImage:self.originalTopBarImages[@"backgroundImage"] ? self.originalTopBarImages[@"backgroundImage"] : [self.navigationBar backgroundImageForBarMetrics:UIBarMetricsDefault] forBarMetrics:UIBarMetricsDefault];
129
+			self.navigationBar.shadowImage = self.originalTopBarImages[@"shadowImage"] ? self.originalTopBarImages[@"shadowImage"] : self.navigationBar.shadowImage;
130 130
 			self.originalTopBarImages = nil;
131 131
 		}
132 132
 	}