浏览代码

Added disabledColor for topBar buttons

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

+ 6
- 0
lib/ios/RNNNavigationButtons.m 查看文件

@@ -101,6 +101,12 @@
101 101
 		[barButtonItem setTintColor:[RCTConvert UIColor: tintColor]];
102 102
 	}
103 103
 	
104
+	NSNumber* disabledColor = dictionary[@"disabledColor"];
105
+	if (disabledColor) {
106
+		UIColor *color = [RCTConvert UIColor:disabledColor];
107
+		[barButtonItem setTitleTextAttributes:@{NSForegroundColorAttributeName : color} forState:UIControlStateDisabled];
108
+	}
109
+	
104 110
 	NSString *testID = dictionary[@"testID"];
105 111
 	if (testID)
106 112
 	{