Browse Source

fixes disabled button colors

yogevbd 6 years ago
parent
commit
54c0031cd0
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      lib/ios/RNNNavigationButtons.m

+ 3
- 3
lib/ios/RNNNavigationButtons.m View File

@@ -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