浏览代码

fixes disabled button colors

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

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

@@ -2,6 +2,7 @@
2 2
 #import "RNNUIBarButtonItem.h"
3 3
 #import <React/RCTConvert.h>
4 4
 #import "RCTHelpers.h"
5
+#import "UIImage+tint.h"
5 6
 
6 7
 @interface RNNNavigationButtons()
7 8
 
@@ -115,8 +116,7 @@
115 116
 	
116 117
 	if (color) {
117 118
 		[textAttributes setObject:color forKey:NSForegroundColorAttributeName];
118
-		[barButtonItem setImage:iconImage];
119
-		[barButtonItem setTintColor:color];
119
+		[barButtonItem setImage:[[iconImage withTintColor:color] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
120 120
 	}
121 121
 	
122 122
 	NSNumber* fontSize = [self fontSize:dictionary[@"fontSize"] defaultFontSize:defaultStyle.fontSize];
@@ -149,7 +149,7 @@
149 149
 	} else if (defaultColor) {
150 150
 		return [RCTConvert UIColor:defaultColor];
151 151
 	}
152
-		
152
+	
153 153
 	return nil;
154 154
 }
155 155