浏览代码

topBar.buttonColor restored

yogevbd 6 年前
父节点
当前提交
7cf172a364
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7
    0
      lib/ios/RNNTopBarOptions.m

+ 7
- 0
lib/ios/RNNTopBarOptions.m 查看文件

@@ -149,6 +149,13 @@ extern const NSInteger BLUR_TOPBAR_TAG;
149 149
 		viewController.navigationController.navigationBar.accessibilityIdentifier = self.testID;
150 150
 	}
151 151
 	
152
+	if (self.buttonColor) {
153
+		UIColor* buttonColor = [RCTConvert UIColor:self.buttonColor];
154
+		viewController.navigationController.navigationBar.tintColor = buttonColor;
155
+	} else {
156
+		viewController.navigationController.navigationBar.tintColor = nil;
157
+	}
158
+	
152 159
 	if (self.rightButtons || self.leftButtons) {
153 160
 		_navigationButtons = [[RNNNavigationButtons alloc] initWithViewController:(RNNRootViewController*)viewController];
154 161
 		[_navigationButtons applyLeftButtons:self.leftButtons rightButtons:self.rightButtons defaultLeftButtonStyle:self.leftButtonStyle defaultRightButtonStyle:self.rightButtonStyle];