Ver código fonte

Bottom tabs appearance iOS 13 support (#5966)

This commit fixes issues with BottomTabs text color on iOS 13

* Extract bottomTab options from base presenter
* Add iOS 13 appearance support for bottomTabs and bottomTab
Yogev Ben David 4 anos atrás
pai
commit
211a46e087
Nenhuma conta vinculada ao e-mail do autor do commit
29 arquivos alterados com 456 adições e 145 exclusões
  1. 6
    0
      lib/ios/BottomTabAppearancePresenter.h
  2. 15
    0
      lib/ios/BottomTabAppearancePresenter.m
  3. 9
    0
      lib/ios/BottomTabPresenter.h
  4. 68
    0
      lib/ios/BottomTabPresenter.m
  5. 8
    0
      lib/ios/BottomTabPresenterCreator.h
  6. 14
    0
      lib/ios/BottomTabPresenterCreator.m
  7. 7
    0
      lib/ios/BottomTabsAppearancePresenter.h
  8. 18
    0
      lib/ios/BottomTabsAppearancePresenter.m
  9. 8
    0
      lib/ios/BottomTabsPresenterCreator.h
  10. 14
    0
      lib/ios/BottomTabsPresenterCreator.m
  11. 8
    102
      lib/ios/RNNBasePresenter.m
  12. 1
    0
      lib/ios/RNNBottomTabOptions.h
  13. 21
    0
      lib/ios/RNNBottomTabOptions.m
  14. 8
    0
      lib/ios/RNNBottomTabsPresenter.h
  15. 20
    7
      lib/ios/RNNBottomTabsPresenter.m
  16. 2
    1
      lib/ios/RNNControllerFactory.m
  17. 4
    0
      lib/ios/RNNTabBarItemCreator.h
  18. 18
    6
      lib/ios/RNNTabBarItemCreator.m
  19. 48
    0
      lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj
  20. 5
    0
      lib/ios/TabBarItemAppearanceCreator.h
  21. 13
    0
      lib/ios/TabBarItemAppearanceCreator.m
  22. 0
    2
      lib/ios/UITabBarController+RNNOptions.h
  23. 0
    4
      lib/ios/UITabBarController+RNNOptions.m
  24. 11
    4
      playground/ios/NavigationIOS12Tests/RNNBottomTabsPresenterTest.m
  25. 1
    1
      playground/ios/NavigationTests/RNNBasePresenterTest.m
  26. 114
    0
      playground/ios/NavigationTests/RNNBottomTabsAppearancePresenterTest.m
  27. 1
    1
      playground/ios/NavigationTests/RNNDotIndicatorPresenterTest.m
  28. 6
    13
      playground/ios/NavigationTests/UITabBarController+RNNOptionsTest.m
  29. 8
    4
      playground/ios/playground.xcodeproj/project.pbxproj

+ 6
- 0
lib/ios/BottomTabAppearancePresenter.h Ver arquivo

@@ -0,0 +1,6 @@
1
+#import "BottomTabPresenter.h"
2
+
3
+API_AVAILABLE(ios(13.0))
4
+@interface BottomTabAppearancePresenter : BottomTabPresenter
5
+
6
+@end

+ 15
- 0
lib/ios/BottomTabAppearancePresenter.m Ver arquivo

@@ -0,0 +1,15 @@
1
+#import "BottomTabAppearancePresenter.h"
2
+#import "TabBarItemAppearanceCreator.h"
3
+
4
+@implementation BottomTabAppearancePresenter
5
+
6
+- (void)bindViewController:(UIViewController *)boundViewController {
7
+    [super bindViewController:boundViewController];
8
+    boundViewController.tabBarItem.standardAppearance = [[UITabBarAppearance alloc] init];
9
+}
10
+
11
+- (void)updateTabBarItem:(UITabBarItem *)tabItem bottomTabOptions:(RNNBottomTabOptions *)bottomTabOptions {
12
+    self.boundViewController.tabBarItem = [TabBarItemAppearanceCreator updateTabBarItem:self.boundViewController.tabBarItem bottomTabOptions:bottomTabOptions];
13
+}
14
+
15
+@end

+ 9
- 0
lib/ios/BottomTabPresenter.h Ver arquivo

@@ -0,0 +1,9 @@
1
+#import "RNNBasePresenter.h"
2
+
3
+@interface BottomTabPresenter : RNNBasePresenter
4
+
5
+- (instancetype)initWithDefaultOptions:(RNNNavigationOptions *)defaultOptions;
6
+
7
+- (void)applyDotIndicator:(UIViewController *)child;
8
+
9
+@end

+ 68
- 0
lib/ios/BottomTabPresenter.m Ver arquivo

@@ -0,0 +1,68 @@
1
+#import "BottomTabPresenter.h"
2
+#import "RNNTabBarItemCreator.h"
3
+#import "UIViewController+RNNOptions.h"
4
+#import "RNNDotIndicatorPresenter.h"
5
+#import "UIViewController+LayoutProtocol.h"
6
+
7
+@interface BottomTabPresenter ()
8
+@property(nonatomic, strong) RNNDotIndicatorPresenter* dotIndicatorPresenter;
9
+@end
10
+
11
+@implementation BottomTabPresenter
12
+
13
+- (instancetype)initWithDefaultOptions:(RNNNavigationOptions *)defaultOptions {
14
+    self = [super init];
15
+    self.defaultOptions = defaultOptions;
16
+    self.dotIndicatorPresenter = [[RNNDotIndicatorPresenter alloc] initWithDefaultOptions:defaultOptions];
17
+    return self;
18
+}
19
+
20
+- (void)applyOptions:(RNNNavigationOptions *)options {
21
+    RNNNavigationOptions * withDefault = [options withDefault:self.defaultOptions];
22
+    
23
+    if (withDefault.bottomTab.badge.hasValue && [self.boundViewController.parentViewController isKindOfClass:[UITabBarController class]]) {
24
+        [self.boundViewController setTabBarItemBadge:withDefault.bottomTab.badge.get];
25
+    }
26
+    
27
+    if (withDefault.bottomTab.badgeColor.hasValue && [self.boundViewController.parentViewController isKindOfClass:[UITabBarController class]]) {
28
+        [self.boundViewController setTabBarItemBadgeColor:withDefault.bottomTab.badgeColor.get];
29
+    }
30
+}
31
+
32
+- (void)applyOptionsOnWillMoveToParentViewController:(RNNNavigationOptions *)options {
33
+    RNNNavigationOptions * withDefault = [options withDefault:self.defaultOptions];
34
+    
35
+    if (withDefault.bottomTab.hasValue) {
36
+        [self updateTabBarItem:self.boundViewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
37
+    }
38
+}
39
+
40
+- (void)mergeOptions:(RNNNavigationOptions *)options resolvedOptions:(RNNNavigationOptions *)resolvedOptions {
41
+    RNNNavigationOptions* withDefault = (RNNNavigationOptions *) [[resolvedOptions withDefault:self.defaultOptions] overrideOptions:options];
42
+    
43
+    if (options.bottomTab.badge.hasValue) {
44
+        [self.boundViewController setTabBarItemBadge:options.bottomTab.badge.get];
45
+    }
46
+    
47
+    if (options.bottomTab.badgeColor.hasValue && [self.boundViewController.parentViewController isKindOfClass:[UITabBarController class]]) {
48
+        [self.boundViewController setTabBarItemBadgeColor:options.bottomTab.badgeColor.get];
49
+    }
50
+    
51
+    if ([options.bottomTab.dotIndicator hasValue] && [self.boundViewController.parentViewController isKindOfClass:[UITabBarController class]]) {
52
+        [[self dotIndicatorPresenter] apply:self.boundViewController:options.bottomTab.dotIndicator];
53
+    }
54
+    
55
+    if (options.bottomTab.hasValue) {
56
+        [self updateTabBarItem:self.boundViewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
57
+    }
58
+}
59
+
60
+- (void)updateTabBarItem:(UITabBarItem *)tabItem bottomTabOptions:(RNNBottomTabOptions *)bottomTabOptions {
61
+    self.boundViewController.tabBarItem = [RNNTabBarItemCreator updateTabBarItem:self.boundViewController.tabBarItem bottomTabOptions:bottomTabOptions];
62
+}
63
+
64
+- (void)applyDotIndicator:(UIViewController *)child {
65
+    [_dotIndicatorPresenter apply:child:[child resolveOptions].bottomTab.dotIndicator];
66
+}
67
+
68
+@end

+ 8
- 0
lib/ios/BottomTabPresenterCreator.h Ver arquivo

@@ -0,0 +1,8 @@
1
+#import <Foundation/Foundation.h>
2
+#import "BottomTabPresenter.h"
3
+
4
+@interface BottomTabPresenterCreator : NSObject
5
+
6
++ (BottomTabPresenter *)createWithDefaultOptions:(RNNNavigationOptions *)defaultOptions;
7
+
8
+@end

+ 14
- 0
lib/ios/BottomTabPresenterCreator.m Ver arquivo

@@ -0,0 +1,14 @@
1
+#import "BottomTabPresenterCreator.h"
2
+#import "BottomTabAppearancePresenter.h"
3
+
4
+@implementation BottomTabPresenterCreator
5
+
6
++ (BottomTabPresenter *)createWithDefaultOptions:(RNNNavigationOptions *)defaultOptions {
7
+	if (@available(iOS 13.0, *)) {
8
+		return [[BottomTabAppearancePresenter alloc] initWithDefaultOptions:defaultOptions];
9
+	} else {
10
+		return [[BottomTabPresenter alloc] initWithDefaultOptions:defaultOptions];
11
+	}
12
+}
13
+
14
+@end

+ 7
- 0
lib/ios/BottomTabsAppearancePresenter.h Ver arquivo

@@ -0,0 +1,7 @@
1
+#import "RNNBottomTabsPresenter.h"
2
+
3
+API_AVAILABLE(ios(13.0))
4
+@interface BottomTabsAppearancePresenter : RNNBottomTabsPresenter
5
+
6
+
7
+@end

+ 18
- 0
lib/ios/BottomTabsAppearancePresenter.m Ver arquivo

@@ -0,0 +1,18 @@
1
+#import "BottomTabsAppearancePresenter.h"
2
+
3
+@implementation BottomTabsAppearancePresenter
4
+
5
+- (void)applyOptionsOnInit:(RNNNavigationOptions *)options {
6
+    [super applyOptionsOnInit:options];
7
+    UITabBarController *bottomTabs = self.tabBarController;
8
+    bottomTabs.tabBar.standardAppearance = [UITabBarAppearance new];
9
+}
10
+
11
+- (void)setTabBarBackgroundColor:(UIColor *)backgroundColor {
12
+    UITabBarController *bottomTabs = self.tabBarController;
13
+    for (UIViewController* childViewController in bottomTabs.childViewControllers) {
14
+        childViewController.tabBarItem.standardAppearance.backgroundColor = backgroundColor;
15
+    }
16
+}
17
+
18
+@end

+ 8
- 0
lib/ios/BottomTabsPresenterCreator.h Ver arquivo

@@ -0,0 +1,8 @@
1
+#import <Foundation/Foundation.h>
2
+#import "RNNBottomTabsPresenter.h"
3
+
4
+@interface BottomTabsPresenterCreator : NSObject
5
+
6
++ (RNNBottomTabsPresenter *)createWithDefaultOptions:(RNNNavigationOptions *)defaultOptions;
7
+
8
+@end

+ 14
- 0
lib/ios/BottomTabsPresenterCreator.m Ver arquivo

@@ -0,0 +1,14 @@
1
+#import "BottomTabsPresenterCreator.h"
2
+#import "BottomTabsAppearancePresenter.h"
3
+
4
+@implementation BottomTabsPresenterCreator
5
+
6
++ (RNNBottomTabsPresenter *)createWithDefaultOptions:(RNNNavigationOptions *)defaultOptions {
7
+	if (@available(iOS 13.0, *)) {
8
+		return [[BottomTabsAppearancePresenter alloc] initWithDefaultOptions:defaultOptions];
9
+	} else {
10
+		return [[RNNBottomTabsPresenter alloc] initWithDefaultOptions:defaultOptions];
11
+	}
12
+}
13
+
14
+@end

+ 8
- 102
lib/ios/RNNBasePresenter.m Ver arquivo

@@ -4,18 +4,18 @@
4 4
 #import "RNNReactComponentRegistry.h"
5 5
 #import "UIViewController+LayoutProtocol.h"
6 6
 #import "DotIndicatorOptions.h"
7
-#import "RNNDotIndicatorPresenter.h"
8 7
 #import "RCTConvert+Modal.h"
8
+#import "BottomTabPresenterCreator.h"
9 9
 
10 10
 @interface RNNBasePresenter ()
11
-@property(nonatomic, strong) RNNDotIndicatorPresenter* dotIndicatorPresenter;
11
+@property(nonatomic, strong) BottomTabPresenter* bottomTabPresenter;
12 12
 @end
13 13
 @implementation RNNBasePresenter
14 14
 
15 15
 - (instancetype)initWithDefaultOptions:(RNNNavigationOptions *)defaultOptions {
16 16
     self = [super init];
17 17
     _defaultOptions = defaultOptions;
18
-    self.dotIndicatorPresenter = [[RNNDotIndicatorPresenter alloc] initWithDefaultOptions:_defaultOptions];
18
+    _bottomTabPresenter = [BottomTabPresenterCreator createWithDefaultOptions:self.defaultOptions];
19 19
     return self;
20 20
 }
21 21
 
@@ -28,6 +28,7 @@
28 28
 - (void)bindViewController:(UIViewController *)boundViewController {
29 29
     self.boundComponentId = boundViewController.layoutInfo.componentId;
30 30
     _boundViewController = boundViewController;
31
+    _bottomTabPresenter.boundViewController = boundViewController;
31 32
 }
32 33
 
33 34
 - (void)setDefaultOptions:(RNNNavigationOptions *)defaultOptions {
@@ -60,113 +61,18 @@
60 61
 }
61 62
 
62 63
 - (void)applyOptionsOnWillMoveToParentViewController:(RNNNavigationOptions *)options {
63
-    UIViewController *viewController = self.boundViewController;
64
-    RNNNavigationOptions * withDefault = [options withDefault:_defaultOptions];
65
-
66
-    if (withDefault.bottomTab.text.hasValue) {
67
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
68
-        viewController.tabBarItem = tabItem;
69
-    }
70
-
71
-    if (withDefault.bottomTab.icon.hasValue) {
72
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
73
-        viewController.tabBarItem = tabItem;
74
-    }
75
-
76
-    if (withDefault.bottomTab.selectedIcon.hasValue) {
77
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
78
-        viewController.tabBarItem = tabItem;
79
-    }
80
-
81
-    if (withDefault.bottomTab.badgeColor.hasValue) {
82
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
83
-        viewController.tabBarItem = tabItem;
84
-    }
85
-
86
-    if (withDefault.bottomTab.textColor.hasValue) {
87
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
88
-        viewController.tabBarItem = tabItem;
89
-    }
90
-
91
-    if (withDefault.bottomTab.iconColor.hasValue) {
92
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
93
-        viewController.tabBarItem = tabItem;
94
-    }
95
-
96
-    if (withDefault.bottomTab.selectedTextColor.hasValue) {
97
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
98
-        viewController.tabBarItem = tabItem;
99
-    }
100
-
101
-    if (withDefault.bottomTab.selectedIconColor.hasValue) {
102
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
103
-        viewController.tabBarItem = tabItem;
104
-    }
64
+    [_bottomTabPresenter applyOptionsOnWillMoveToParentViewController:options];
105 65
 }
106 66
 
107 67
 - (void)applyOptions:(RNNNavigationOptions *)options {
108
-    UIViewController *viewController = self.boundViewController;
109
-    RNNNavigationOptions * withDefault = [options withDefault:_defaultOptions];
110
-
111
-    if (withDefault.bottomTab.badge.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
112
-        [viewController setTabBarItemBadge:withDefault.bottomTab.badge.get];
113
-    }
114
-
115
-    if (withDefault.bottomTab.badgeColor.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
116
-        [viewController setTabBarItemBadgeColor:withDefault.bottomTab.badgeColor.get];
117
-    }
68
+    [_bottomTabPresenter applyOptions:options];
118 69
 }
119 70
 
120 71
 - (void)mergeOptions:(RNNNavigationOptions *)options resolvedOptions:(RNNNavigationOptions *)resolvedOptions {
121 72
     UIViewController* viewController = self.boundViewController;
122 73
     RNNNavigationOptions* withDefault = (RNNNavigationOptions *) [[resolvedOptions withDefault:_defaultOptions] overrideOptions:options];
123 74
     
124
-    if (options.bottomTab.badge.hasValue) {
125
-        [viewController setTabBarItemBadge:options.bottomTab.badge.get];
126
-    }
127
-
128
-    if (options.bottomTab.badgeColor.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
129
-        [viewController setTabBarItemBadgeColor:options.bottomTab.badgeColor.get];
130
-    }
131
-
132
-    if ([options.bottomTab.dotIndicator hasValue] && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
133
-        [[self dotIndicatorPresenter] apply:viewController:options.bottomTab.dotIndicator];
134
-    }
135
-
136
-    if (options.bottomTab.text.hasValue) {
137
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
138
-        viewController.tabBarItem = tabItem;
139
-    }
140
-
141
-    if (options.bottomTab.icon.hasValue) {
142
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
143
-        viewController.tabBarItem = tabItem;
144
-    }
145
-
146
-    if (options.bottomTab.selectedIcon.hasValue) {
147
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
148
-        viewController.tabBarItem = tabItem;
149
-    }
150
-
151
-    if (options.bottomTab.textColor.hasValue) {
152
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
153
-        viewController.tabBarItem = tabItem;
154
-    }
155
-
156
-    if (options.bottomTab.selectedTextColor.hasValue) {
157
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
158
-        viewController.tabBarItem = tabItem;
159
-    }
160
-
161
-    if (options.bottomTab.iconColor.hasValue) {
162
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
163
-        viewController.tabBarItem = tabItem;
164
-    }
165
-
166
-    if (options.bottomTab.selectedIconColor.hasValue) {
167
-        UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
168
-        viewController.tabBarItem = tabItem;
169
-    }
75
+    [_bottomTabPresenter mergeOptions:options resolvedOptions:resolvedOptions];
170 76
 	
171 77
 	if (options.window.backgroundColor.hasValue) {
172 78
 		UIApplication.sharedApplication.delegate.window.backgroundColor = withDefault.window.backgroundColor.get;
@@ -185,7 +91,7 @@
185 91
 }
186 92
 
187 93
 - (void)applyDotIndicator:(UIViewController *)child {
188
-    [[self dotIndicatorPresenter] apply:child:[child resolveOptions].bottomTab.dotIndicator];
94
+    [_bottomTabPresenter applyDotIndicator:child];
189 95
 }
190 96
 
191 97
 - (UIStatusBarStyle)getStatusBarStyle:(RNNNavigationOptions *)resolvedOptions {

+ 1
- 0
lib/ios/RNNBottomTabOptions.h Ver arquivo

@@ -23,5 +23,6 @@
23 23
 @property(nonatomic, strong) Bool *visible;
24 24
 @property(nonatomic, strong) Bool *selectTabOnPress;
25 25
 
26
+- (BOOL)hasValue;
26 27
 
27 28
 @end

+ 21
- 0
lib/ios/RNNBottomTabOptions.m Ver arquivo

@@ -32,4 +32,25 @@
32 32
     return self;
33 33
 }
34 34
 
35
+- (BOOL)hasValue {
36
+    return
37
+    self.text.hasValue ||
38
+    self.badge.hasValue ||
39
+    self.badgeColor.hasValue ||
40
+    self.fontFamily.hasValue ||
41
+    self.fontWeight.hasValue ||
42
+    self.fontSize.hasValue ||
43
+    self.testID.hasValue ||
44
+    self.icon.hasValue ||
45
+    self.selectedIcon.hasValue ||
46
+    self.iconColor.hasValue ||
47
+    self.selectedIconColor.hasValue ||
48
+    self.selectedTextColor.hasValue ||
49
+    self.iconInsets.hasValue ||
50
+    self.textColor.hasValue ||
51
+    self.visible.hasValue ||
52
+    self.selectTabOnPress.hasValue;
53
+    
54
+}
55
+
35 56
 @end

+ 8
- 0
lib/ios/RNNBottomTabsPresenter.h Ver arquivo

@@ -1,5 +1,13 @@
1 1
 #import "RNNBasePresenter.h"
2 2
 
3 3
 @interface RNNBottomTabsPresenter : RNNBasePresenter
4
+
4 5
 - (void)applyDotIndicator;
6
+
7
+- (void)setTabBarBackgroundColor:(UIColor *)backgroundColor;
8
+
9
+- (UITabBarController *)tabBarController;
10
+
11
+- (UITabBar *)tabBar;
12
+
5 13
 @end

+ 20
- 7
lib/ios/RNNBottomTabsPresenter.m Ver arquivo

@@ -7,7 +7,7 @@
7 7
 
8 8
 - (void)applyOptionsOnInit:(RNNNavigationOptions *)options {
9 9
     [super applyOptionsOnInit:options];
10
-    UITabBarController *bottomTabs = self.boundViewController;
10
+    UITabBarController *bottomTabs = self.tabBarController;
11 11
     RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
12 12
     [bottomTabs setCurrentTabIndex:[withDefault.bottomTabs.currentTabIndex getWithDefaultValue:0]];
13 13
 	if ([[withDefault.bottomTabs.titleDisplayMode getWithDefaultValue:@"alwaysShow"] isEqualToString:@"alwaysHide"]) {
@@ -16,21 +16,22 @@
16 16
 }
17 17
 
18 18
 - (void)applyOptions:(RNNNavigationOptions *)options {
19
-    UITabBarController *bottomTabs = self.boundViewController;
19
+    UITabBarController *bottomTabs = self.tabBarController;
20 20
     RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
21 21
 
22 22
     [bottomTabs setTabBarTestID:[withDefault.bottomTabs.testID getWithDefaultValue:nil]];
23
-    [bottomTabs setTabBarBackgroundColor:[withDefault.bottomTabs.backgroundColor getWithDefaultValue:nil]];
23
+    [bottomTabs setTabBarVisible:[withDefault.bottomTabs.visible getWithDefaultValue:YES] animated:[withDefault.bottomTabs.animate getWithDefaultValue:NO]];
24
+    
25
+    [bottomTabs.view setBackgroundColor:[withDefault.layout.backgroundColor getWithDefaultValue:nil]];
26
+    [self setTabBarBackgroundColor:[withDefault.bottomTabs.backgroundColor getWithDefaultValue:UIColor.whiteColor]];
24 27
     [bottomTabs setTabBarTranslucent:[withDefault.bottomTabs.translucent getWithDefaultValue:NO]];
25 28
     [bottomTabs setTabBarHideShadow:[withDefault.bottomTabs.hideShadow getWithDefaultValue:NO]];
26 29
     [bottomTabs setTabBarStyle:[RCTConvert UIBarStyle:[withDefault.bottomTabs.barStyle getWithDefaultValue:@"default"]]];
27
-    [bottomTabs setTabBarVisible:[withDefault.bottomTabs.visible getWithDefaultValue:YES] animated:[withDefault.bottomTabs.animate getWithDefaultValue:NO]];
28
-    [bottomTabs.view setBackgroundColor:[withDefault.layout.backgroundColor getWithDefaultValue:nil]];
29 30
 }
30 31
 
31 32
 - (void)mergeOptions:(RNNNavigationOptions *)options resolvedOptions:(RNNNavigationOptions *)currentOptions {
32 33
     [super mergeOptions:options resolvedOptions:currentOptions];
33
-    UITabBarController *bottomTabs = self.boundViewController;
34
+    UITabBarController *bottomTabs = self.tabBarController;
34 35
 
35 36
     if (options.bottomTabs.currentTabIndex.hasValue) {
36 37
         [bottomTabs setCurrentTabIndex:options.bottomTabs.currentTabIndex.get];
@@ -47,7 +48,7 @@
47 48
     }
48 49
 
49 50
     if (options.bottomTabs.backgroundColor.hasValue) {
50
-        [bottomTabs setTabBarBackgroundColor:options.bottomTabs.backgroundColor.get];
51
+        [self setTabBarBackgroundColor:options.bottomTabs.backgroundColor.get];
51 52
     }
52 53
 
53 54
     if (options.bottomTabs.barStyle.hasValue) {
@@ -75,6 +76,18 @@
75 76
     }
76 77
 }
77 78
 
79
+- (void)setTabBarBackgroundColor:(UIColor *)backgroundColor {
80
+    self.tabBar.barTintColor = backgroundColor;
81
+}
82
+
83
+- (UITabBarController *)tabBarController {
84
+    return (UITabBarController *)self.boundViewController;
85
+}
86
+
87
+- (UITabBar *)tabBar {
88
+    return self.tabBarController.tabBar;
89
+}
90
+
78 91
 - (void)viewDidLayoutSubviews {
79 92
     dispatch_async(dispatch_get_main_queue(), ^{
80 93
         [self applyDotIndicator];

+ 2
- 1
lib/ios/RNNControllerFactory.m Ver arquivo

@@ -8,6 +8,7 @@
8 8
 #import "RNNExternalViewController.h"
9 9
 #import "BottomTabsBaseAttacher.h"
10 10
 #import "BottomTabsAttachModeFactory.h"
11
+#import "BottomTabsPresenterCreator.h"
11 12
 
12 13
 @implementation RNNControllerFactory {
13 14
 	id<RNNComponentViewCreator> _creator;
@@ -148,7 +149,7 @@
148 149
 - (UIViewController *)createBottomTabs:(RNNLayoutNode*)node {
149 150
     RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] initWithNode:node];
150 151
     RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initWithDict:node.data[@"options"]];
151
-    RNNBottomTabsPresenter* presenter = [[RNNBottomTabsPresenter alloc] initWithDefaultOptions:_defaultOptions];
152
+    RNNBottomTabsPresenter* presenter = [BottomTabsPresenterCreator createWithDefaultOptions:_defaultOptions];
152 153
 	BottomTabsBaseAttacher* bottomTabsAttacher = [_bottomTabsAttachModeFactory fromOptions:options];
153 154
     
154 155
     NSArray *childViewControllers = [self extractChildrenViewControllersFromNode:node];

+ 4
- 0
lib/ios/RNNTabBarItemCreator.h Ver arquivo

@@ -6,4 +6,8 @@
6 6
 
7 7
 + (UITabBarItem *)updateTabBarItem:(UITabBarItem *)tabItem bottomTabOptions:(RNNBottomTabOptions *)bottomTabOptions;
8 8
 
9
++ (void)setTitleAttributes:(UITabBarItem *)tabItem titleAttributes:(NSDictionary *)titleAttributes;
10
+
11
++ (void)setSelectedTitleAttributes:(UITabBarItem *)tabItem selectedTitleAttributes:(NSDictionary *)selectedTitleAttributes;
12
+
9 13
 @end

+ 18
- 6
lib/ios/RNNTabBarItemCreator.m Ver arquivo

@@ -31,9 +31,7 @@
31 31
 		tabItem.imageInsets = UIEdgeInsetsMake(top, left, bottom, right);
32 32
 	}
33 33
 	
34
-	
35
-	
36
-	[self appendTitleAttributes:tabItem textColor:[bottomTabOptions.textColor getWithDefaultValue:nil] selectedTextColor:[bottomTabOptions.selectedTextColor getWithDefaultValue:nil] fontFamily:[bottomTabOptions.fontFamily getWithDefaultValue:nil] fontSize:[bottomTabOptions.fontSize getWithDefaultValue:nil] fontWeight:[bottomTabOptions.fontWeight getWithDefaultValue:nil]];
34
+	[self appendTitleAttributes:tabItem bottomTabOptions:bottomTabOptions];
37 35
 	
38 36
 	return tabItem;
39 37
 }
@@ -62,13 +60,27 @@
62 60
 	return nil;
63 61
 }
64 62
 
65
-+ (void)appendTitleAttributes:(UITabBarItem *)tabItem textColor:(UIColor *)textColor selectedTextColor:(UIColor *)selectedTextColor fontFamily:(NSString *)fontFamily fontSize:(NSNumber *)fontSize fontWeight:(NSString *)fontWeight {
63
++ (void)appendTitleAttributes:(UITabBarItem *)tabItem bottomTabOptions:(RNNBottomTabOptions *)bottomTabOptions {
64
+    UIColor* textColor = [bottomTabOptions.textColor getWithDefaultValue:nil];
65
+    UIColor* selectedTextColor = [bottomTabOptions.selectedTextColor getWithDefaultValue:nil];
66
+    NSString* fontFamily = [bottomTabOptions.fontFamily getWithDefaultValue:nil];
67
+    NSNumber* fontSize = [bottomTabOptions.fontSize getWithDefaultValue:nil];
68
+    NSString* fontWeight = [bottomTabOptions.fontWeight getWithDefaultValue:nil];
69
+    
66 70
 	NSDictionary* selectedAttributes = [RNNFontAttributesCreator createFromDictionary:[tabItem titleTextAttributesForState:UIControlStateSelected] fontFamily:fontFamily fontSize:fontSize defaultFontSize:@(10) fontWeight:fontWeight color:selectedTextColor defaultColor:[UIColor blackColor]];
67
-	[tabItem setTitleTextAttributes:selectedAttributes forState:UIControlStateSelected];
71
+	[self setSelectedTitleAttributes:tabItem selectedTitleAttributes:selectedAttributes];
68 72
 	
69 73
 	
70 74
 	NSDictionary* normalAttributes = [RNNFontAttributesCreator createFromDictionary:[tabItem titleTextAttributesForState:UIControlStateNormal] fontFamily:fontFamily fontSize:fontSize defaultFontSize:@(10) fontWeight:fontWeight color:textColor defaultColor:[UIColor blackColor]];
71
-	[tabItem setTitleTextAttributes:normalAttributes forState:UIControlStateNormal];
75
+	[self setTitleAttributes:tabItem titleAttributes:normalAttributes];
76
+}
77
+
78
++ (void)setTitleAttributes:(UITabBarItem *)tabItem titleAttributes:(NSDictionary *)titleAttributes {
79
+	[tabItem setTitleTextAttributes:titleAttributes forState:UIControlStateNormal];
80
+}
81
+
82
++ (void)setSelectedTitleAttributes:(UITabBarItem *)tabItem selectedTitleAttributes:(NSDictionary *)selectedTitleAttributes {
83
+	[tabItem setTitleTextAttributes:selectedTitleAttributes forState:UIControlStateSelected];
72 84
 }
73 85
 
74 86
 @end

+ 48
- 0
lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj Ver arquivo

@@ -91,6 +91,18 @@
91 91
 		501E0217213E7EA3003365C5 /* RNNReactView.h in Headers */ = {isa = PBXBuildFile; fileRef = 501E0215213E7EA3003365C5 /* RNNReactView.h */; };
92 92
 		501E0218213E7EA3003365C5 /* RNNReactView.m in Sources */ = {isa = PBXBuildFile; fileRef = 501E0216213E7EA3003365C5 /* RNNReactView.m */; };
93 93
 		50206A6D21AFE75400B7BB1A /* RNNSideMenuParserTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 50206A6C21AFE75400B7BB1A /* RNNSideMenuParserTest.m */; };
94
+		5022EDB52405224B00852BA6 /* BottomTabPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5022EDB32405224B00852BA6 /* BottomTabPresenter.h */; };
95
+		5022EDB62405224B00852BA6 /* BottomTabPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5022EDB42405224B00852BA6 /* BottomTabPresenter.m */; };
96
+		5022EDB92405226800852BA6 /* BottomTabAppearancePresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5022EDB72405226800852BA6 /* BottomTabAppearancePresenter.h */; };
97
+		5022EDBA2405226800852BA6 /* BottomTabAppearancePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5022EDB82405226800852BA6 /* BottomTabAppearancePresenter.m */; };
98
+		5022EDBD2405237100852BA6 /* BottomTabPresenterCreator.h in Headers */ = {isa = PBXBuildFile; fileRef = 5022EDBB2405237100852BA6 /* BottomTabPresenterCreator.h */; };
99
+		5022EDBE2405237100852BA6 /* BottomTabPresenterCreator.m in Sources */ = {isa = PBXBuildFile; fileRef = 5022EDBC2405237100852BA6 /* BottomTabPresenterCreator.m */; };
100
+		5022EDC124053C9F00852BA6 /* TabBarItemAppearanceCreator.h in Headers */ = {isa = PBXBuildFile; fileRef = 5022EDBF24053C9F00852BA6 /* TabBarItemAppearanceCreator.h */; };
101
+		5022EDC224053C9F00852BA6 /* TabBarItemAppearanceCreator.m in Sources */ = {isa = PBXBuildFile; fileRef = 5022EDC024053C9F00852BA6 /* TabBarItemAppearanceCreator.m */; };
102
+		5022EDC524054C6100852BA6 /* BottomTabsAppearancePresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5022EDC324054C6100852BA6 /* BottomTabsAppearancePresenter.h */; };
103
+		5022EDC624054C6100852BA6 /* BottomTabsAppearancePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5022EDC424054C6100852BA6 /* BottomTabsAppearancePresenter.m */; };
104
+		5022EDC924054C8A00852BA6 /* BottomTabsPresenterCreator.h in Headers */ = {isa = PBXBuildFile; fileRef = 5022EDC724054C8A00852BA6 /* BottomTabsPresenterCreator.h */; };
105
+		5022EDCA24054C8A00852BA6 /* BottomTabsPresenterCreator.m in Sources */ = {isa = PBXBuildFile; fileRef = 5022EDC824054C8A00852BA6 /* BottomTabsPresenterCreator.m */; };
94 106
 		502CB46E20CD1DDA0019B2FE /* RNNBackButtonOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 502CB46C20CD1DDA0019B2FE /* RNNBackButtonOptions.h */; };
95 107
 		502CB46F20CD1DDA0019B2FE /* RNNBackButtonOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 502CB46D20CD1DDA0019B2FE /* RNNBackButtonOptions.m */; };
96 108
 		502F0E142178CF8200367CC3 /* UIViewController+RNNOptionsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 502F0E132178CF8200367CC3 /* UIViewController+RNNOptionsTest.m */; };
@@ -561,6 +573,18 @@
561 573
 		501E0215213E7EA3003365C5 /* RNNReactView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNReactView.h; sourceTree = "<group>"; };
562 574
 		501E0216213E7EA3003365C5 /* RNNReactView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNReactView.m; sourceTree = "<group>"; };
563 575
 		50206A6C21AFE75400B7BB1A /* RNNSideMenuParserTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNSideMenuParserTest.m; sourceTree = "<group>"; };
576
+		5022EDB32405224B00852BA6 /* BottomTabPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BottomTabPresenter.h; sourceTree = "<group>"; };
577
+		5022EDB42405224B00852BA6 /* BottomTabPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BottomTabPresenter.m; sourceTree = "<group>"; };
578
+		5022EDB72405226800852BA6 /* BottomTabAppearancePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BottomTabAppearancePresenter.h; sourceTree = "<group>"; };
579
+		5022EDB82405226800852BA6 /* BottomTabAppearancePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BottomTabAppearancePresenter.m; sourceTree = "<group>"; };
580
+		5022EDBB2405237100852BA6 /* BottomTabPresenterCreator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BottomTabPresenterCreator.h; sourceTree = "<group>"; };
581
+		5022EDBC2405237100852BA6 /* BottomTabPresenterCreator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BottomTabPresenterCreator.m; sourceTree = "<group>"; };
582
+		5022EDBF24053C9F00852BA6 /* TabBarItemAppearanceCreator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TabBarItemAppearanceCreator.h; sourceTree = "<group>"; };
583
+		5022EDC024053C9F00852BA6 /* TabBarItemAppearanceCreator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TabBarItemAppearanceCreator.m; sourceTree = "<group>"; };
584
+		5022EDC324054C6100852BA6 /* BottomTabsAppearancePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BottomTabsAppearancePresenter.h; sourceTree = "<group>"; };
585
+		5022EDC424054C6100852BA6 /* BottomTabsAppearancePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BottomTabsAppearancePresenter.m; sourceTree = "<group>"; };
586
+		5022EDC724054C8A00852BA6 /* BottomTabsPresenterCreator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BottomTabsPresenterCreator.h; sourceTree = "<group>"; };
587
+		5022EDC824054C8A00852BA6 /* BottomTabsPresenterCreator.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BottomTabsPresenterCreator.m; sourceTree = "<group>"; };
564 588
 		502CB43920CBCA140019B2FE /* RNNBridgeManagerDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNBridgeManagerDelegate.h; sourceTree = "<group>"; };
565 589
 		502CB46C20CD1DDA0019B2FE /* RNNBackButtonOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNBackButtonOptions.h; sourceTree = "<group>"; };
566 590
 		502CB46D20CD1DDA0019B2FE /* RNNBackButtonOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNBackButtonOptions.m; sourceTree = "<group>"; };
@@ -991,6 +1015,8 @@
991 1015
 				5030B62823D5C9AF008F1642 /* RCTConvert+Interpolation.h */,
992 1016
 				5038A3BB216E1490009280BC /* RNNTabBarItemCreator.h */,
993 1017
 				5038A3BC216E1490009280BC /* RNNTabBarItemCreator.m */,
1018
+				5022EDBF24053C9F00852BA6 /* TabBarItemAppearanceCreator.h */,
1019
+				5022EDC024053C9F00852BA6 /* TabBarItemAppearanceCreator.m */,
994 1020
 				5053CE7D2175FB1900D0386B /* RNNDefaultOptionsHelper.h */,
995 1021
 				5053CE7E2175FB1900D0386B /* RNNDefaultOptionsHelper.m */,
996 1022
 				C2A57A1A21E815F80066711C /* InteractivePopGestureDelegate.h */,
@@ -1360,6 +1386,16 @@
1360 1386
 				50CED450239F9DFC00C42EE2 /* TopBarPresenter.m */,
1361 1387
 				505C640023E074860078AFC0 /* TopBarTitlePresenter.h */,
1362 1388
 				505C640123E074860078AFC0 /* TopBarTitlePresenter.m */,
1389
+				5022EDB32405224B00852BA6 /* BottomTabPresenter.h */,
1390
+				5022EDB42405224B00852BA6 /* BottomTabPresenter.m */,
1391
+				5022EDB72405226800852BA6 /* BottomTabAppearancePresenter.h */,
1392
+				5022EDB82405226800852BA6 /* BottomTabAppearancePresenter.m */,
1393
+				5022EDC324054C6100852BA6 /* BottomTabsAppearancePresenter.h */,
1394
+				5022EDC424054C6100852BA6 /* BottomTabsAppearancePresenter.m */,
1395
+				5022EDBB2405237100852BA6 /* BottomTabPresenterCreator.h */,
1396
+				5022EDBC2405237100852BA6 /* BottomTabPresenterCreator.m */,
1397
+				5022EDC724054C8A00852BA6 /* BottomTabsPresenterCreator.h */,
1398
+				5022EDC824054C8A00852BA6 /* BottomTabsPresenterCreator.m */,
1363 1399
 			);
1364 1400
 			name = Presenters;
1365 1401
 			sourceTree = "<group>";
@@ -1636,6 +1672,7 @@
1636 1672
 				5060DE74219DAD8300D0C052 /* RNNBridgeManagerDelegate.h in Headers */,
1637 1673
 				5060DE73219DAD7E00D0C052 /* ReactNativeNavigation.h in Headers */,
1638 1674
 				261F0E6A1E6F028A00989DE2 /* RNNNavigationStackManager.h in Headers */,
1675
+				5022EDBD2405237100852BA6 /* BottomTabPresenterCreator.h in Headers */,
1639 1676
 				507ACB1523F44E5200829911 /* RNNComponentRootView.h in Headers */,
1640 1677
 				5061B6C723D48449008B9827 /* VerticalRotationTransition.h in Headers */,
1641 1678
 				50EB4ED72068EBE000D6ED34 /* RNNBackgroundOptions.h in Headers */,
@@ -1679,6 +1716,7 @@
1679 1716
 				5012240A21735959000F5F98 /* RNNSideMenuPresenter.h in Headers */,
1680 1717
 				50E02BDD21A6EE7900A43942 /* SideMenuOpenGestureModeParser.h in Headers */,
1681 1718
 				50A5628E23DDAB6F0027C219 /* ModalTransitionDelegate.h in Headers */,
1719
+				5022EDB52405224B00852BA6 /* BottomTabPresenter.h in Headers */,
1682 1720
 				5038A3B5216DF602009280BC /* UINavigationController+RNNOptions.h in Headers */,
1683 1721
 				50E5F78D223F9FAF002AFEAD /* ElementTransitionOptions.h in Headers */,
1684 1722
 				509416AB23A11CB20036092C /* NullEnum.h in Headers */,
@@ -1694,10 +1732,12 @@
1694 1732
 				505EDD34214E7B7B0071C7DE /* RNNLeafProtocol.h in Headers */,
1695 1733
 				507ACB1123F44D1E00829911 /* RNNComponentView.h in Headers */,
1696 1734
 				263905B51E4C6F440023D7D3 /* MMExampleDrawerVisualStateManager.h in Headers */,
1735
+				5022EDB92405226800852BA6 /* BottomTabAppearancePresenter.h in Headers */,
1697 1736
 				50451D052042DAEB00695F00 /* RNNPushAnimation.h in Headers */,
1698 1737
 				507F43C51FF4F17C00D9425B /* RNNTopTabsViewController.h in Headers */,
1699 1738
 				501223D72173590F000F5F98 /* RNNStackPresenter.h in Headers */,
1700 1739
 				50495946216F5FB5006D2B81 /* TextParser.h in Headers */,
1740
+				5022EDC524054C6100852BA6 /* BottomTabsAppearancePresenter.h in Headers */,
1701 1741
 				503A8A1923BCB2ED0094D1C4 /* RNNReactButtonView.h in Headers */,
1702 1742
 				505EDD3C214FA8000071C7DE /* RNNComponentPresenter.h in Headers */,
1703 1743
 				502CB46E20CD1DDA0019B2FE /* RNNBackButtonOptions.h in Headers */,
@@ -1761,6 +1801,7 @@
1761 1801
 				5017D9E6239D2D9E00B74047 /* BottomTabsBaseAttacher.h in Headers */,
1762 1802
 				4534E72520CB6724009F8185 /* RNNLargeTitleOptions.h in Headers */,
1763 1803
 				390AD477200F499D00A8250D /* RNNSwizzles.h in Headers */,
1804
+				5022EDC924054C8A00852BA6 /* BottomTabsPresenterCreator.h in Headers */,
1764 1805
 				263905B11E4C6F440023D7D3 /* MMDrawerController.h in Headers */,
1765 1806
 				263905B31E4C6F440023D7D3 /* MMDrawerVisualState.h in Headers */,
1766 1807
 				50451D092042E20600695F00 /* RNNAnimationsOptions.h in Headers */,
@@ -1778,6 +1819,7 @@
1778 1819
 				5030B62723D5B54E008F1642 /* LNInterpolable.h in Headers */,
1779 1820
 				50EA541623AEDF5D006F881A /* RNNInterpolator.h in Headers */,
1780 1821
 				5017D9EE239D2FAF00B74047 /* BottomTabsAfterInitialTabAttacher.h in Headers */,
1822
+				5022EDC124053C9F00852BA6 /* TabBarItemAppearanceCreator.h in Headers */,
1781 1823
 				50395593217485B000B0A663 /* Double.h in Headers */,
1782 1824
 				5050465421F8F4490035497A /* RNNReactComponentRegistry.h in Headers */,
1783 1825
 				504AFE741FFFF0540076E904 /* RNNTopTabsOptions.h in Headers */,
@@ -1970,6 +2012,7 @@
1970 2012
 				5012241B21736678000F5F98 /* Image.m in Sources */,
1971 2013
 				50DE2E46238EA14E005CD5F4 /* NSArray+utils.m in Sources */,
1972 2014
 				50495943216F5E5D006D2B81 /* NullBool.m in Sources */,
2015
+				5022EDBE2405237100852BA6 /* BottomTabPresenterCreator.m in Sources */,
1973 2016
 				5038A3C7216E2D93009280BC /* Number.m in Sources */,
1974 2017
 				E5F6C3A622DB4D0F0093C2CE /* UIViewController+Utils.m in Sources */,
1975 2018
 				5048862E20BE976D000908DE /* RNNLayoutOptions.m in Sources */,
@@ -1984,6 +2027,7 @@
1984 2027
 				261F0E6B1E6F028A00989DE2 /* RNNNavigationStackManager.m in Sources */,
1985 2028
 				5016E8F020209690009D4F7C /* RNNCustomTitleView.m in Sources */,
1986 2029
 				5061B6C823D48449008B9827 /* VerticalRotationTransition.m in Sources */,
2030
+				5022EDB62405224B00852BA6 /* BottomTabPresenter.m in Sources */,
1987 2031
 				503955982174864E00B0A663 /* NullDouble.m in Sources */,
1988 2032
 				E8DA24411F97459B00CD552B /* RNNElementFinder.m in Sources */,
1989 2033
 				503A8A2223BCE9C60094D1C4 /* RNNReactBackgroundView.m in Sources */,
@@ -1996,6 +2040,7 @@
1996 2040
 				50495953216F62BD006D2B81 /* NullNumber.m in Sources */,
1997 2041
 				50D3A36F23B8D6C600717F95 /* SharedElementTransitionsCreator.m in Sources */,
1998 2042
 				5012242721737278000F5F98 /* NullImage.m in Sources */,
2043
+				5022EDC624054C6100852BA6 /* BottomTabsAppearancePresenter.m in Sources */,
1999 2044
 				7B1126A01E2D263F00F9B03B /* RNNEventEmitter.m in Sources */,
2000 2045
 				A7626BFD1FC2FB2C00492FB8 /* RNNTopBarOptions.m in Sources */,
2001 2046
 				5050465521F8F4490035497A /* RNNReactComponentRegistry.m in Sources */,
@@ -2010,6 +2055,7 @@
2010 2055
 				390AD478200F499D00A8250D /* RNNSwizzles.m in Sources */,
2011 2056
 				50E02BD921A6EE0F00A43942 /* SideMenuOpenMode.m in Sources */,
2012 2057
 				503A8A0E23BC9BC50094D1C4 /* ElementVerticalTransition.m in Sources */,
2058
+				5022EDBA2405226800852BA6 /* BottomTabAppearancePresenter.m in Sources */,
2013 2059
 				5030B62C23D5D732008F1642 /* ContentTransitionCreator.m in Sources */,
2014 2060
 				7BA500751E2544B9001B9E1B /* ReactNativeNavigation.m in Sources */,
2015 2061
 				50E5F7962240EBD6002AFEAD /* RNNAnimationsTransitionDelegate.m in Sources */,
@@ -2064,6 +2110,7 @@
2064 2110
 				50D4656E23CE2553005A84B2 /* Transition.m in Sources */,
2065 2111
 				263905D71E4C94970023D7D3 /* RNNSideMenuController.m in Sources */,
2066 2112
 				50EB4ED82068EBE000D6ED34 /* RNNBackgroundOptions.m in Sources */,
2113
+				5022EDCA24054C8A00852BA6 /* BottomTabsPresenterCreator.m in Sources */,
2067 2114
 				507F43CA1FF4F9CC00D9425B /* RNNTopTabOptions.m in Sources */,
2068 2115
 				26916C991E4B9E7700D13680 /* RNNReactRootViewCreator.m in Sources */,
2069 2116
 				5064495E20DC62B90026709C /* RNNSideMenuSideOptions.m in Sources */,
@@ -2148,6 +2195,7 @@
2148 2195
 				30987D71FB4FEEAC8D8978E8 /* DotIndicatorParser.m in Sources */,
2149 2196
 				50CED44E239EA78700C42EE2 /* TopBarAppearancePresenter.m in Sources */,
2150 2197
 				30987B23F288EB3A78B7F27C /* RNNDotIndicatorPresenter.m in Sources */,
2198
+				5022EDC224053C9F00852BA6 /* TabBarItemAppearanceCreator.m in Sources */,
2151 2199
 				507ACB1223F44D1E00829911 /* RNNComponentView.m in Sources */,
2152 2200
 				5017D9F3239D2FCB00B74047 /* BottomTabsOnSwitchToTabAttacher.m in Sources */,
2153 2201
 				50AD1CE123CB428400FF3134 /* TransitionOptions.m in Sources */,

+ 5
- 0
lib/ios/TabBarItemAppearanceCreator.h Ver arquivo

@@ -0,0 +1,5 @@
1
+#import "RNNTabBarItemCreator.h"
2
+
3
+@interface TabBarItemAppearanceCreator : RNNTabBarItemCreator
4
+
5
+@end

+ 13
- 0
lib/ios/TabBarItemAppearanceCreator.m Ver arquivo

@@ -0,0 +1,13 @@
1
+#import "TabBarItemAppearanceCreator.h"
2
+
3
+@implementation TabBarItemAppearanceCreator
4
+
5
++ (void)setTitleAttributes:(UITabBarItem *)tabItem titleAttributes:(NSDictionary *)titleAttributes {
6
+    tabItem.standardAppearance.stackedLayoutAppearance.normal.titleTextAttributes = titleAttributes;
7
+}
8
+
9
++ (void)setSelectedTitleAttributes:(UITabBarItem *)tabItem selectedTitleAttributes:(NSDictionary *)selectedTitleAttributes {
10
+    tabItem.standardAppearance.stackedLayoutAppearance.selected.titleTextAttributes = selectedTitleAttributes;
11
+}
12
+
13
+@end

+ 0
- 2
lib/ios/UITabBarController+RNNOptions.h Ver arquivo

@@ -8,8 +8,6 @@
8 8
 
9 9
 - (void)setTabBarTestID:(NSString *)testID;
10 10
 
11
-- (void)setTabBarBackgroundColor:(UIColor *)backgroundColor;
12
-
13 11
 - (void)setTabBarStyle:(UIBarStyle)barStyle;
14 12
 
15 13
 - (void)setTabBarTranslucent:(BOOL)translucent;

+ 0
- 4
lib/ios/UITabBarController+RNNOptions.m Ver arquivo

@@ -16,10 +16,6 @@
16 16
 	self.tabBar.accessibilityIdentifier = testID;
17 17
 }
18 18
 
19
-- (void)setTabBarBackgroundColor:(UIColor *)backgroundColor {
20
-	self.tabBar.barTintColor = backgroundColor;
21
-}
22
-
23 19
 - (void)setTabBarStyle:(UIBarStyle)barStyle {
24 20
 	self.tabBar.barStyle = barStyle;
25 21
 }

playground/ios/NavigationTests/RNNTabBarPresenterTest.m → playground/ios/NavigationIOS12Tests/RNNBottomTabsPresenterTest.m Ver arquivo

@@ -4,7 +4,7 @@
4 4
 #import "UITabBarController+RNNOptions.h"
5 5
 #import "RNNBottomTabsController.h"
6 6
 
7
-@interface RNNTabBarPresenterTest : XCTestCase
7
+@interface RNNBottomTabsPresenterTest : XCTestCase
8 8
 
9 9
 @property(nonatomic, strong) RNNBottomTabsPresenter *uut;
10 10
 @property(nonatomic, strong) RNNNavigationOptions *options;
@@ -12,7 +12,7 @@
12 12
 
13 13
 @end
14 14
 
15
-@implementation RNNTabBarPresenterTest
15
+@implementation RNNBottomTabsPresenterTest
16 16
 
17 17
 - (void)setUp {
18 18
     [super setUp];
@@ -25,7 +25,7 @@
25 25
 - (void)testApplyOptions_shouldSetDefaultEmptyOptions {
26 26
     RNNNavigationOptions *emptyOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
27 27
     [[self.boundViewController expect] setTabBarTestID:nil];
28
-    [[self.boundViewController expect] setTabBarBackgroundColor:nil];
28
+    [self.uut setTabBarBackgroundColor:nil];
29 29
     [[self.boundViewController expect] setTabBarTranslucent:NO];
30 30
     [[self.boundViewController expect] setTabBarHideShadow:NO];
31 31
     [[self.boundViewController expect] setTabBarStyle:UIBarStyleDefault];
@@ -44,7 +44,7 @@
44 44
     initialOptions.bottomTabs.barStyle = [[Text alloc] initWithValue:@"black"];
45 45
 
46 46
     [[self.boundViewController expect] setTabBarTestID:@"testID"];
47
-    [[self.boundViewController expect] setTabBarBackgroundColor:[UIColor redColor]];
47
+    [self.uut setTabBarBackgroundColor:[UIColor redColor]];
48 48
     [[self.boundViewController expect] setTabBarTranslucent:NO];
49 49
     [[self.boundViewController expect] setTabBarHideShadow:YES];
50 50
     [[self.boundViewController expect] setTabBarStyle:UIBarStyleBlack];
@@ -100,4 +100,11 @@
100 100
 	XCTAssertTrue([((UIViewController *)self.boundViewController).view.backgroundColor isEqual:expectedColor]);
101 101
 }
102 102
 
103
+- (void)testTabBarBackgroundColor {
104
+	UIColor* tabBarBackgroundColor = [UIColor redColor];
105
+
106
+	[self.uut setTabBarBackgroundColor:tabBarBackgroundColor];
107
+	XCTAssertTrue([((UIViewController *)self.uut).tabBarController.tabBar.barTintColor isEqual:tabBarBackgroundColor]);
108
+}
109
+
103 110
 @end

+ 1
- 1
playground/ios/NavigationTests/RNNBasePresenterTest.m Ver arquivo

@@ -17,7 +17,7 @@
17 17
 
18 18
 - (void)setUp {
19 19
     [super setUp];
20
-    self.uut = [[RNNBasePresenter alloc] init];
20
+    self.uut = [[RNNBasePresenter alloc] initWithDefaultOptions:[[RNNNavigationOptions alloc] initEmptyOptions]];
21 21
     self.boundViewController = [RNNComponentViewController new];
22 22
     self.mockBoundViewController = [OCMockObject partialMockForObject:self.boundViewController];
23 23
 	[self.uut bindViewController:self.mockBoundViewController];

+ 114
- 0
playground/ios/NavigationTests/RNNBottomTabsAppearancePresenterTest.m Ver arquivo

@@ -0,0 +1,114 @@
1
+#import <XCTest/XCTest.h>
2
+#import <OCMock/OCMock.h>
3
+#import "BottomTabsAppearancePresenter.h"
4
+#import "UITabBarController+RNNOptions.h"
5
+#import "RNNBottomTabsController.h"
6
+#import "RNNComponentViewController.h"
7
+
8
+@interface RNNBottomTabsAppearancePresenterTest : XCTestCase
9
+
10
+@property(nonatomic, strong) BottomTabsAppearancePresenter *uut;
11
+@property(nonatomic, strong) RNNNavigationOptions *options;
12
+@property(nonatomic, strong) id boundViewController;
13
+
14
+@end
15
+
16
+@implementation RNNBottomTabsAppearancePresenterTest
17
+
18
+- (void)setUp {
19
+    [super setUp];
20
+    self.uut = [OCMockObject partialMockForObject:[BottomTabsAppearancePresenter new]];
21
+    self.boundViewController = [OCMockObject partialMockForObject:[RNNBottomTabsController new]];
22
+    [self.uut bindViewController:self.boundViewController];
23
+    self.options = [[RNNNavigationOptions alloc] initEmptyOptions];
24
+}
25
+
26
+- (void)testApplyOptions_shouldSetDefaultEmptyOptions {
27
+    RNNNavigationOptions *emptyOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
28
+    [[self.boundViewController expect] setTabBarTestID:nil];
29
+    [self.uut setTabBarBackgroundColor:nil];
30
+    [[self.boundViewController expect] setTabBarTranslucent:NO];
31
+    [[self.boundViewController expect] setTabBarHideShadow:NO];
32
+    [[self.boundViewController expect] setTabBarStyle:UIBarStyleDefault];
33
+    [[self.boundViewController expect] setTabBarVisible:YES animated:NO];
34
+    [self.uut applyOptions:emptyOptions];
35
+    [self.boundViewController verify];
36
+}
37
+
38
+- (void)testApplyOptions_shouldApplyOptions {
39
+    RNNNavigationOptions *initialOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
40
+    initialOptions.bottomTabs.testID = [[Text alloc] initWithValue:@"testID"];
41
+    initialOptions.bottomTabs.backgroundColor = [[Color alloc] initWithValue:[UIColor redColor]];
42
+    initialOptions.bottomTabs.translucent = [[Bool alloc] initWithValue:@(0)];
43
+    initialOptions.bottomTabs.hideShadow = [[Bool alloc] initWithValue:@(1)];
44
+    initialOptions.bottomTabs.visible = [[Bool alloc] initWithValue:@(0)];
45
+    initialOptions.bottomTabs.barStyle = [[Text alloc] initWithValue:@"black"];
46
+
47
+    [[self.boundViewController expect] setTabBarTestID:@"testID"];
48
+    [self.uut setTabBarBackgroundColor:[UIColor redColor]];
49
+    [[self.boundViewController expect] setTabBarTranslucent:NO];
50
+    [[self.boundViewController expect] setTabBarHideShadow:YES];
51
+    [[self.boundViewController expect] setTabBarStyle:UIBarStyleBlack];
52
+    [[self.boundViewController expect] setTabBarVisible:NO animated:NO];
53
+
54
+    [self.uut applyOptions:initialOptions];
55
+    [self.boundViewController verify];
56
+}
57
+
58
+- (void)testApplyOptionsOnInit_alwaysShow_shouldNotCenterTabImages {
59
+	RNNNavigationOptions *initialOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
60
+	initialOptions.bottomTabs.titleDisplayMode = [[Text alloc] initWithValue:@"alwaysShow"];
61
+	[[self.boundViewController reject] centerTabItems];
62
+	[self.uut applyOptionsOnInit:initialOptions];
63
+	[self.boundViewController verify];
64
+}
65
+
66
+- (void)testApplyOptions_shouldApplyOptionsOnInit_alwaysHide_shouldCenterTabImages {
67
+	RNNNavigationOptions *initialOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
68
+	initialOptions.bottomTabs.titleDisplayMode = [[Text alloc] initWithValue:@"alwaysHide"];
69
+	[[self.boundViewController expect] centerTabItems];
70
+	[self.uut applyOptionsOnInit:initialOptions];
71
+	[self.boundViewController verify];
72
+}
73
+
74
+- (void)testViewDidLayoutSubviews_appliesBadgeOnNextRunLoop {
75
+    id uut = [self uut];
76
+    [[uut expect] applyDotIndicator];
77
+    [uut viewDidLayoutSubviews];
78
+    [[NSRunLoop mainRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.01]];
79
+    [uut verify];
80
+}
81
+
82
+- (void)testApplyDotIndicator_callsAppliesBadgeWithEachChild {
83
+    id uut = [self uut];
84
+    id child1 = [UIViewController new];
85
+    id child2 = [UIViewController new];
86
+
87
+    [[uut expect] applyDotIndicator:child1];
88
+    [[uut expect] applyDotIndicator:child2];
89
+    [[self boundViewController] addChildViewController:child1];
90
+    [[self boundViewController] addChildViewController:child2];
91
+
92
+    [uut applyDotIndicator];
93
+    [uut verify];
94
+}
95
+
96
+- (void)testBackgroundColor_validColor {
97
+	UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
98
+	self.options.layout.backgroundColor = [[Color alloc] initWithValue:inputColor];
99
+	[self.uut applyOptions:self.options];
100
+	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
101
+	XCTAssertTrue([((UIViewController *)self.boundViewController).view.backgroundColor isEqual:expectedColor]);
102
+}
103
+
104
+- (void)testTabBarBackgroundColor {
105
+	UIColor* tabBarBackgroundColor = [UIColor redColor];
106
+	RNNComponentPresenter* vcPresenter = [[RNNComponentPresenter alloc] initWithDefaultOptions:nil];
107
+	UIViewController* vc = [[RNNComponentViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:vcPresenter options:nil defaultOptions:nil];
108
+	
109
+	[((UITabBarController *)self.boundViewController) setViewControllers:@[vc]];
110
+	[self.uut setTabBarBackgroundColor:tabBarBackgroundColor];
111
+	XCTAssertTrue([vc.tabBarItem.standardAppearance.backgroundColor isEqual:tabBarBackgroundColor]);
112
+}
113
+
114
+@end

+ 1
- 1
playground/ios/NavigationTests/RNNDotIndicatorPresenterTest.m Ver arquivo

@@ -145,7 +145,7 @@
145 145
     id img = [OCMockObject partialMockForObject:[UIImage new]];
146 146
 
147 147
     options.bottomTab.icon = [[Image alloc] initWithValue:img];
148
-    return [[RNNComponentViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[RNNComponentPresenter new] options:options defaultOptions:nil];
148
+    return [[RNNComponentViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[[RNNComponentPresenter alloc] initWithDefaultOptions:[[RNNNavigationOptions alloc] initEmptyOptions]] options:options defaultOptions:nil];
149 149
 }
150 150
 
151 151
 - (BOOL)tabHasIndicator {

+ 6
- 13
playground/ios/NavigationTests/UITabBarController+RNNOptionsTest.m Ver arquivo

@@ -17,6 +17,12 @@
17 17
 	OCMStub([self.uut tabBar]).andReturn([OCMockObject partialMockForObject:[UITabBar new]]);
18 18
 }
19 19
 
20
+- (void)test_centerTabItems {
21
+	[[(id)self.uut.tabBar expect] centerTabItems];
22
+	[self.uut centerTabItems];
23
+	[(id)self.uut.tabBar verify];
24
+}
25
+
20 26
 - (void)test_tabBarTranslucent_true {
21 27
 	[self.uut setTabBarTranslucent:YES];
22 28
 	XCTAssertTrue(self.uut.tabBar.translucent);
@@ -41,17 +47,4 @@
41 47
 	XCTAssertFalse(self.uut.tabBar.clipsToBounds);
42 48
 }
43 49
 
44
-- (void)test_centerTabItems {
45
-	[[(id)self.uut.tabBar expect] centerTabItems];
46
-	[self.uut centerTabItems];
47
-	[(id)self.uut.tabBar verify];
48
-}
49
-
50
-- (void)test_tabBarBackgroundColor {
51
-	UIColor* tabBarBackgroundColor = [UIColor redColor];
52
-
53
-	[self.uut setTabBarBackgroundColor:tabBarBackgroundColor];
54
-	XCTAssertTrue([self.uut.tabBar.barTintColor isEqual:tabBarBackgroundColor]);
55
-}
56
-
57 50
 @end

+ 8
- 4
playground/ios/playground.xcodeproj/project.pbxproj Ver arquivo

@@ -12,6 +12,8 @@
12 12
 		13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13 13
 		13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
14 14
 		501C86B9239FE9C400E0B631 /* UIImage+Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 501C86B8239FE9C400E0B631 /* UIImage+Utils.m */; };
15
+		5022EDCD2405522000852BA6 /* RNNBottomTabsPresenterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E58D263A2385888C003F36BA /* RNNBottomTabsPresenterTest.m */; };
16
+		5022EDCE2405524700852BA6 /* RNNBottomTabsAppearancePresenterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5022EDCB240551EE00852BA6 /* RNNBottomTabsAppearancePresenterTest.m */; };
15 17
 		50451D35204451A900695F00 /* RNNCustomViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 50451D34204451A800695F00 /* RNNCustomViewController.m */; };
16 18
 		50647FE323E3196800B92025 /* RNNExternalViewControllerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 50647FE223E3196800B92025 /* RNNExternalViewControllerTests.m */; };
17 19
 		50996C6823AA477400008F89 /* RNNRootViewControllerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 50996C6723AA477400008F89 /* RNNRootViewControllerTest.m */; };
@@ -36,7 +38,6 @@
36 38
 		E58D26532385888C003F36BA /* RNNSideMenuPresenterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E58D26362385888B003F36BA /* RNNSideMenuPresenterTest.m */; };
37 39
 		E58D26542385888C003F36BA /* RNNSideMenuControllerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E58D26372385888B003F36BA /* RNNSideMenuControllerTest.m */; };
38 40
 		E58D26552385888C003F36BA /* RNNTransitionStateHolderTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E58D26382385888B003F36BA /* RNNTransitionStateHolderTest.m */; };
39
-		E58D26572385888C003F36BA /* RNNTabBarPresenterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E58D263A2385888C003F36BA /* RNNTabBarPresenterTest.m */; };
40 41
 		E58D26582385888C003F36BA /* UITabBarController+RNNOptionsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E58D263B2385888C003F36BA /* UITabBarController+RNNOptionsTest.m */; };
41 42
 		E58D26592385888C003F36BA /* RNNNavigationStackManagerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = E58D263C2385888C003F36BA /* RNNNavigationStackManagerTest.m */; };
42 43
 		E58D265A2385888C003F36BA /* RNNTestRootViewCreator.m in Sources */ = {isa = PBXBuildFile; fileRef = E58D263D2385888C003F36BA /* RNNTestRootViewCreator.m */; };
@@ -81,6 +82,7 @@
81 82
 		4AE37ACF6BFBAB211EE8E7E9 /* Pods-NavigationIOS12Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NavigationIOS12Tests.release.xcconfig"; path = "Target Support Files/Pods-NavigationIOS12Tests/Pods-NavigationIOS12Tests.release.xcconfig"; sourceTree = "<group>"; };
82 83
 		501C86B7239FE9C400E0B631 /* UIImage+Utils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIImage+Utils.h"; sourceTree = "<group>"; };
83 84
 		501C86B8239FE9C400E0B631 /* UIImage+Utils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Utils.m"; sourceTree = "<group>"; };
85
+		5022EDCB240551EE00852BA6 /* RNNBottomTabsAppearancePresenterTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNBottomTabsAppearancePresenterTest.m; sourceTree = "<group>"; };
84 86
 		50364D69238E7ECC000E62A2 /* Pods_playground.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Pods_playground.framework; sourceTree = BUILT_PRODUCTS_DIR; };
85 87
 		50364D6B238E7F0A000E62A2 /* ReactNativeNavigation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = ReactNativeNavigation.framework; sourceTree = BUILT_PRODUCTS_DIR; };
86 88
 		50451D33204451A800695F00 /* RNNCustomViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNNCustomViewController.h; path = ../../../lib/ios/RNNCustomViewController.h; sourceTree = "<group>"; };
@@ -118,7 +120,7 @@
118 120
 		E58D26362385888B003F36BA /* RNNSideMenuPresenterTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNSideMenuPresenterTest.m; sourceTree = "<group>"; };
119 121
 		E58D26372385888B003F36BA /* RNNSideMenuControllerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNSideMenuControllerTest.m; sourceTree = "<group>"; };
120 122
 		E58D26382385888B003F36BA /* RNNTransitionStateHolderTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNTransitionStateHolderTest.m; sourceTree = "<group>"; };
121
-		E58D263A2385888C003F36BA /* RNNTabBarPresenterTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNTabBarPresenterTest.m; sourceTree = "<group>"; };
123
+		E58D263A2385888C003F36BA /* RNNBottomTabsPresenterTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNBottomTabsPresenterTest.m; sourceTree = "<group>"; };
122 124
 		E58D263B2385888C003F36BA /* UITabBarController+RNNOptionsTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITabBarController+RNNOptionsTest.m"; sourceTree = "<group>"; };
123 125
 		E58D263C2385888C003F36BA /* RNNNavigationStackManagerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNNavigationStackManagerTest.m; sourceTree = "<group>"; };
124 126
 		E58D263D2385888C003F36BA /* RNNTestRootViewCreator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNTestRootViewCreator.m; sourceTree = "<group>"; };
@@ -192,6 +194,7 @@
192 194
 		50996C5E23AA46DD00008F89 /* NavigationIOS12Tests */ = {
193 195
 			isa = PBXGroup;
194 196
 			children = (
197
+				E58D263A2385888C003F36BA /* RNNBottomTabsPresenterTest.m */,
195 198
 				50996C6723AA477400008F89 /* RNNRootViewControllerTest.m */,
196 199
 				50996C6123AA46DD00008F89 /* Info.plist */,
197 200
 			);
@@ -269,7 +272,7 @@
269 272
 				E58D26362385888B003F36BA /* RNNSideMenuPresenterTest.m */,
270 273
 				E58D26312385888B003F36BA /* RNNStackPresenterTest.m */,
271 274
 				E58D26292385888B003F36BA /* RNNTabBarControllerTest.m */,
272
-				E58D263A2385888C003F36BA /* RNNTabBarPresenterTest.m */,
275
+				5022EDCB240551EE00852BA6 /* RNNBottomTabsAppearancePresenterTest.m */,
273 276
 				E58D26342385888B003F36BA /* RNNTestRootViewCreator.h */,
274 277
 				E58D263D2385888C003F36BA /* RNNTestRootViewCreator.m */,
275 278
 				E58D26382385888B003F36BA /* RNNTransitionStateHolderTest.m */,
@@ -731,6 +734,7 @@
731 734
 			isa = PBXSourcesBuildPhase;
732 735
 			buildActionMask = 2147483647;
733 736
 			files = (
737
+				5022EDCD2405522000852BA6 /* RNNBottomTabsPresenterTest.m in Sources */,
734 738
 				50996C6923AA487800008F89 /* RNNTestRootViewCreator.m in Sources */,
735 739
 				50996C6823AA477400008F89 /* RNNRootViewControllerTest.m in Sources */,
736 740
 			);
@@ -762,12 +766,12 @@
762 766
 				E58D26602385888C003F36BA /* RNNModalManagerTest.m in Sources */,
763 767
 				E58D26502385888C003F36BA /* RNNNavigationOptionsTest.m in Sources */,
764 768
 				E58D264E2385888C003F36BA /* RNNTestBase.m in Sources */,
769
+				5022EDCE2405524700852BA6 /* RNNBottomTabsAppearancePresenterTest.m in Sources */,
765 770
 				E58D26612385888C003F36BA /* RNNTestNoColor.m in Sources */,
766 771
 				E58D265D2385888C003F36BA /* RNNControllerFactoryTest.m in Sources */,
767 772
 				E58D265C2385888C003F36BA /* RNNStackControllerTest.m in Sources */,
768 773
 				E58D26482385888C003F36BA /* RNNDotIndicatorPresenterTest.m in Sources */,
769 774
 				E58D26522385888C003F36BA /* RNNComponentPresenterTest.m in Sources */,
770
-				E58D26572385888C003F36BA /* RNNTabBarPresenterTest.m in Sources */,
771 775
 				E58D264C2385888C003F36BA /* RNNSideMenuParserTest.m in Sources */,
772 776
 				E58D264F2385888C003F36BA /* RNNStackPresenterTest.m in Sources */,
773 777
 			);