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