|
@@ -116,8 +116,10 @@
|
116
|
116
|
}
|
117
|
117
|
|
118
|
118
|
- (void)mergeOptions:(RNNNavigationOptions *)options resolvedOptions:(RNNNavigationOptions *)resolvedOptions {
|
119
|
|
- UIViewController *viewController = self.boundViewController;
|
120
|
|
- if (options.bottomTab.badge.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
|
|
119
|
+ UIViewController* viewController = self.boundViewController;
|
|
120
|
+ RNNNavigationOptions* withDefault = (RNNNavigationOptions *) [[resolvedOptions withDefault:_defaultOptions] overrideOptions:options];
|
|
121
|
+
|
|
122
|
+ if (options.bottomTab.badge.hasValue) {
|
121
|
123
|
[viewController setTabBarItemBadge:options.bottomTab.badge.get];
|
122
|
124
|
}
|
123
|
125
|
|
|
@@ -130,44 +132,37 @@
|
130
|
132
|
}
|
131
|
133
|
|
132
|
134
|
if (options.bottomTab.text.hasValue) {
|
133
|
|
- RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [resolvedOptions overrideOptions:options];
|
134
|
|
- UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
|
|
135
|
+ UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
|
135
|
136
|
viewController.tabBarItem = tabItem;
|
136
|
137
|
}
|
137
|
138
|
|
138
|
139
|
if (options.bottomTab.icon.hasValue) {
|
139
|
|
- RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [resolvedOptions overrideOptions:options];
|
140
|
|
- UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
|
|
140
|
+ UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
|
141
|
141
|
viewController.tabBarItem = tabItem;
|
142
|
142
|
}
|
143
|
143
|
|
144
|
144
|
if (options.bottomTab.selectedIcon.hasValue) {
|
145
|
|
- RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [resolvedOptions overrideOptions:options];
|
146
|
|
- UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
|
|
145
|
+ UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
|
147
|
146
|
viewController.tabBarItem = tabItem;
|
148
|
147
|
}
|
149
|
148
|
|
150
|
149
|
if (options.bottomTab.textColor.hasValue) {
|
151
|
|
- RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [resolvedOptions overrideOptions:options];
|
152
|
|
- UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
|
|
150
|
+ UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
|
153
|
151
|
viewController.tabBarItem = tabItem;
|
154
|
152
|
}
|
155
|
153
|
|
156
|
154
|
if (options.bottomTab.selectedTextColor.hasValue) {
|
157
|
|
- RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [resolvedOptions overrideOptions:options];
|
158
|
|
- UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
|
|
155
|
+ UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
|
159
|
156
|
viewController.tabBarItem = tabItem;
|
160
|
157
|
}
|
161
|
158
|
|
162
|
159
|
if (options.bottomTab.iconColor.hasValue) {
|
163
|
|
- RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [resolvedOptions overrideOptions:options];
|
164
|
|
- UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
|
|
160
|
+ UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
|
165
|
161
|
viewController.tabBarItem = tabItem;
|
166
|
162
|
}
|
167
|
163
|
|
168
|
164
|
if (options.bottomTab.selectedIconColor.hasValue) {
|
169
|
|
- RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [resolvedOptions overrideOptions:options];
|
170
|
|
- UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
|
|
165
|
+ UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:withDefault.bottomTab];
|
171
|
166
|
viewController.tabBarItem = tabItem;
|
172
|
167
|
}
|
173
|
168
|
}
|