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