|
@@ -23,47 +23,51 @@
|
23
|
23
|
}
|
24
|
24
|
|
25
|
25
|
- (void)applyOptionsOnInit:(RNNNavigationOptions *)initialOptions {
|
|
26
|
+
|
|
27
|
+}
|
26
|
28
|
|
|
29
|
+- (void)applyOptionsOnSetViewControllers:(RNNNavigationOptions *)options {
|
|
30
|
+
|
27
|
31
|
}
|
28
|
32
|
|
29
|
33
|
- (void)applyOptionsOnWillMoveToParentViewController:(RNNNavigationOptions *)options {
|
30
|
34
|
UIViewController* viewController = self.bindedViewController;
|
31
|
|
-
|
|
35
|
+
|
32
|
36
|
if (options.bottomTab.text.hasValue) {
|
33
|
37
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:options.bottomTab];
|
34
|
38
|
viewController.tabBarItem = tabItem;
|
35
|
39
|
}
|
36
|
|
-
|
|
40
|
+
|
37
|
41
|
if (options.bottomTab.icon.hasValue) {
|
38
|
42
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:options.bottomTab];
|
39
|
43
|
viewController.tabBarItem = tabItem;
|
40
|
44
|
}
|
41
|
|
-
|
|
45
|
+
|
42
|
46
|
if (options.bottomTab.selectedIcon.hasValue) {
|
43
|
47
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:options.bottomTab];
|
44
|
48
|
viewController.tabBarItem = tabItem;
|
45
|
49
|
}
|
46
|
|
-
|
|
50
|
+
|
47
|
51
|
if (options.bottomTab.badgeColor.hasValue) {
|
48
|
52
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:options.bottomTab];
|
49
|
53
|
viewController.tabBarItem = tabItem;
|
50
|
54
|
}
|
51
|
|
-
|
|
55
|
+
|
52
|
56
|
if (options.bottomTab.textColor.hasValue) {
|
53
|
57
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:options.bottomTab];
|
54
|
58
|
viewController.tabBarItem = tabItem;
|
55
|
59
|
}
|
56
|
|
-
|
|
60
|
+
|
57
|
61
|
if (options.bottomTab.iconColor.hasValue) {
|
58
|
62
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:options.bottomTab];
|
59
|
63
|
viewController.tabBarItem = tabItem;
|
60
|
64
|
}
|
61
|
|
-
|
|
65
|
+
|
62
|
66
|
if (options.bottomTab.selectedTextColor.hasValue) {
|
63
|
67
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:options.bottomTab];
|
64
|
68
|
viewController.tabBarItem = tabItem;
|
65
|
69
|
}
|
66
|
|
-
|
|
70
|
+
|
67
|
71
|
if (options.bottomTab.selectedIconColor.hasValue) {
|
68
|
72
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:options.bottomTab];
|
69
|
73
|
viewController.tabBarItem = tabItem;
|
|
@@ -72,11 +76,11 @@
|
72
|
76
|
|
73
|
77
|
- (void)applyOptions:(RNNNavigationOptions *)options {
|
74
|
78
|
UIViewController* viewController = self.bindedViewController;
|
75
|
|
-
|
|
79
|
+
|
76
|
80
|
if (options.bottomTab.badge.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
|
77
|
81
|
[viewController rnn_setTabBarItemBadge:options.bottomTab.badge.get];
|
78
|
82
|
}
|
79
|
|
-
|
|
83
|
+
|
80
|
84
|
if (options.bottomTab.badgeColor.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
|
81
|
85
|
[viewController rnn_setTabBarItemBadgeColor:options.bottomTab.badgeColor.get];
|
82
|
86
|
}
|
|
@@ -87,47 +91,47 @@
|
87
|
91
|
if (newOptions.bottomTab.badge.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
|
88
|
92
|
[viewController rnn_setTabBarItemBadge:newOptions.bottomTab.badge.get];
|
89
|
93
|
}
|
90
|
|
-
|
|
94
|
+
|
91
|
95
|
if (newOptions.bottomTab.badgeColor.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
|
92
|
96
|
[viewController rnn_setTabBarItemBadgeColor:newOptions.bottomTab.badgeColor.get];
|
93
|
97
|
}
|
94
|
|
-
|
|
98
|
+
|
95
|
99
|
if (newOptions.bottomTab.text.hasValue) {
|
96
|
100
|
RNNNavigationOptions* buttonsResolvedOptions = [(RNNNavigationOptions *)[currentOptions overrideOptions:newOptions] withDefault:defaultOptions];
|
97
|
101
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
|
98
|
102
|
viewController.tabBarItem = tabItem;
|
99
|
103
|
}
|
100
|
|
-
|
|
104
|
+
|
101
|
105
|
if (newOptions.bottomTab.icon.hasValue) {
|
102
|
106
|
RNNNavigationOptions* buttonsResolvedOptions = [(RNNNavigationOptions *)[currentOptions overrideOptions:newOptions] withDefault:defaultOptions];
|
103
|
107
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
|
104
|
108
|
viewController.tabBarItem = tabItem;
|
105
|
109
|
}
|
106
|
|
-
|
|
110
|
+
|
107
|
111
|
if (newOptions.bottomTab.selectedIcon.hasValue) {
|
108
|
112
|
RNNNavigationOptions* buttonsResolvedOptions = [(RNNNavigationOptions *)[currentOptions overrideOptions:newOptions] withDefault:defaultOptions];
|
109
|
113
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
|
110
|
114
|
viewController.tabBarItem = tabItem;
|
111
|
115
|
}
|
112
|
|
-
|
|
116
|
+
|
113
|
117
|
if (newOptions.bottomTab.textColor.hasValue) {
|
114
|
118
|
RNNNavigationOptions* buttonsResolvedOptions = [(RNNNavigationOptions *)[currentOptions overrideOptions:newOptions] withDefault:defaultOptions];
|
115
|
119
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
|
116
|
120
|
viewController.tabBarItem = tabItem;
|
117
|
121
|
}
|
118
|
|
-
|
|
122
|
+
|
119
|
123
|
if (newOptions.bottomTab.selectedTextColor.hasValue) {
|
120
|
124
|
RNNNavigationOptions* buttonsResolvedOptions = [(RNNNavigationOptions *)[currentOptions overrideOptions:newOptions] withDefault:defaultOptions];
|
121
|
125
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
|
122
|
126
|
viewController.tabBarItem = tabItem;
|
123
|
127
|
}
|
124
|
|
-
|
|
128
|
+
|
125
|
129
|
if (newOptions.bottomTab.iconColor.hasValue) {
|
126
|
130
|
RNNNavigationOptions* buttonsResolvedOptions = [(RNNNavigationOptions *)[currentOptions overrideOptions:newOptions] withDefault:defaultOptions];
|
127
|
131
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
|
128
|
132
|
viewController.tabBarItem = tabItem;
|
129
|
133
|
}
|
130
|
|
-
|
|
134
|
+
|
131
|
135
|
if (newOptions.bottomTab.selectedIconColor.hasValue) {
|
132
|
136
|
RNNNavigationOptions* buttonsResolvedOptions = [(RNNNavigationOptions *)[currentOptions overrideOptions:newOptions] withDefault:defaultOptions];
|
133
|
137
|
UITabBarItem* tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
|