|
@@ -13,7 +13,13 @@
|
13
|
13
|
|
14
|
14
|
- (void)applyOn:(UIViewController *)viewController {
|
15
|
15
|
if (self.title || self.icon) {
|
16
|
|
- UITabBarItem* tabItem = [[UITabBarItem alloc] initWithTitle:self.title image:[RCTConvert UIImage:self.icon] tag:self.tag];
|
|
16
|
+ UIImage *iconImage = nil;
|
|
17
|
+ if (self.disableIconTint) {
|
|
18
|
+ iconImage = [[RCTConvert UIImage:self.icon] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
19
|
+ } else {
|
|
20
|
+ iconImage = [RCTConvert UIImage:self.icon];
|
|
21
|
+ }
|
|
22
|
+ UITabBarItem* tabItem = [[UITabBarItem alloc] initWithTitle:self.title image:iconImage tag:self.tag];
|
17
|
23
|
tabItem.accessibilityIdentifier = self.testID;
|
18
|
24
|
|
19
|
25
|
if (self.iconInsets && ![self.iconInsets isKindOfClass:[NSNull class]]) {
|
|
@@ -32,6 +38,19 @@
|
32
|
38
|
|
33
|
39
|
[viewController.navigationController setTabBarItem:tabItem];
|
34
|
40
|
}
|
|
41
|
+ if (self.selectedIcon) {
|
|
42
|
+ UIImage *selectedIconImage = nil;
|
|
43
|
+ if (self.disableSelectedIconTint) {
|
|
44
|
+ selectedIconImage = [[RCTConvert UIImage:self.selectedIcon] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
45
|
+ } else {
|
|
46
|
+ selectedIconImage = [RCTConvert UIImage:self.selectedIcon];
|
|
47
|
+ }
|
|
48
|
+ if (viewController.navigationController) {
|
|
49
|
+ viewController.navigationController.tabBarItem.selectedImage = selectedIconImage;
|
|
50
|
+ } else {
|
|
51
|
+ viewController.tabBarItem.selectedImage = selectedIconImage;
|
|
52
|
+ }
|
|
53
|
+ }
|
35
|
54
|
|
36
|
55
|
if (self.badge) {
|
37
|
56
|
NSString *badge = nil;
|