react-native-navigation 8.7.5-snapshot.2330 → 8.7.5-snapshot.2337
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
#pragma mark - public
|
|
8
8
|
|
|
9
9
|
- (void)applyBackgroundColor:(UIColor *)backgroundColor translucent:(BOOL)translucent {
|
|
10
|
+
if (@available(iOS 26.0, *)) {
|
|
11
|
+
[self setTabBarTransparentBackground];
|
|
12
|
+
self.tabBar.backgroundColor = UIColor.clearColor;
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
10
15
|
if (translucent)
|
|
11
16
|
[self setTabBarTranslucent:YES];
|
|
12
17
|
else if (backgroundColor.isTransparent)
|
|
@@ -19,26 +24,33 @@
|
|
|
19
24
|
|
|
20
25
|
- (void)applyTabBarBorder:(RNNBottomTabsOptions *)options {
|
|
21
26
|
if (options.borderColor.hasValue || options.borderWidth.hasValue) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
UIImage *borderImage = [UIImage
|
|
28
|
+
imageWithSize:CGSizeMake(1.0, [[options.borderWidth withDefault:@(0.1)] floatValue])
|
|
29
|
+
color:[options.borderColor withDefault:UIColor.blackColor]];
|
|
30
|
+
|
|
31
|
+
for (UIViewController *childViewController in self.tabBarController.childViewControllers) {
|
|
32
|
+
childViewController.tabBarItem.standardAppearance.shadowImage = borderImage;
|
|
33
|
+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000
|
|
34
|
+
if (@available(iOS 15.0, *)) {
|
|
35
|
+
childViewController.tabBarItem.scrollEdgeAppearance.shadowImage = borderImage;
|
|
36
|
+
}
|
|
37
|
+
#endif
|
|
38
|
+
}
|
|
26
39
|
}
|
|
27
40
|
}
|
|
28
41
|
|
|
29
42
|
- (void)setTabBarBackgroundColor:(UIColor *)backgroundColor {
|
|
30
|
-
[self
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
#endif
|
|
43
|
+
UITabBarAppearance *appearance = [self appearanceWithColor:backgroundColor];
|
|
44
|
+
[self applyTabBarAppearance:appearance];
|
|
45
|
+
self.tabBar.barTintColor = backgroundColor;
|
|
46
|
+
self.tabBar.translucent = NO;
|
|
47
|
+
if (@available(iOS 26.0, *)) {
|
|
48
|
+
self.tabBar.backgroundColor = backgroundColor;
|
|
38
49
|
}
|
|
39
50
|
}
|
|
40
51
|
|
|
41
52
|
- (void)setTabBarTranslucent:(BOOL)translucent {
|
|
53
|
+
self.tabBar.translucent = translucent;
|
|
42
54
|
if (translucent)
|
|
43
55
|
[self setTabBarTranslucentBackground];
|
|
44
56
|
else
|
|
@@ -48,38 +60,63 @@
|
|
|
48
60
|
#pragma mark - private
|
|
49
61
|
|
|
50
62
|
- (void)setTabBarDefaultBackground {
|
|
51
|
-
|
|
63
|
+
if (@available(iOS 26.0, *)) {
|
|
64
|
+
[self setTabBarTransparentBackground];
|
|
65
|
+
self.tabBar.backgroundColor = UIColor.clearColor;
|
|
66
|
+
} else {
|
|
67
|
+
[self setTabBarOpaqueBackground];
|
|
68
|
+
}
|
|
52
69
|
}
|
|
53
70
|
|
|
54
71
|
- (void)setTabBarTranslucentBackground {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
[childViewController.tabBarItem.scrollEdgeAppearance configureWithDefaultBackground];
|
|
60
|
-
}
|
|
61
|
-
#endif
|
|
62
|
-
}
|
|
72
|
+
UITabBarAppearance *appearance = [UITabBarAppearance new];
|
|
73
|
+
[appearance configureWithDefaultBackground];
|
|
74
|
+
[self applyTabBarAppearance:appearance];
|
|
75
|
+
self.tabBar.barTintColor = nil;
|
|
63
76
|
}
|
|
64
77
|
|
|
65
78
|
- (void)setTabBarTransparentBackground {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
#endif
|
|
74
|
-
}
|
|
79
|
+
UITabBarAppearance *appearance = [UITabBarAppearance new];
|
|
80
|
+
[appearance configureWithTransparentBackground];
|
|
81
|
+
appearance.backgroundEffect = nil;
|
|
82
|
+
appearance.backgroundColor = UIColor.clearColor;
|
|
83
|
+
[self applyTabBarAppearance:appearance];
|
|
84
|
+
self.tabBar.barTintColor = UIColor.clearColor;
|
|
75
85
|
}
|
|
76
86
|
|
|
77
87
|
- (void)setTabBarOpaqueBackground {
|
|
88
|
+
UITabBarAppearance *appearance = [self appearanceWithColor:nil];
|
|
89
|
+
[self applyTabBarAppearance:appearance];
|
|
90
|
+
self.tabBar.barTintColor = UIColor.systemBackgroundColor;
|
|
91
|
+
self.tabBar.translucent = NO;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
#pragma mark - helpers
|
|
95
|
+
|
|
96
|
+
- (UITabBarAppearance *)appearanceWithColor:(UIColor *)color {
|
|
97
|
+
UITabBarAppearance *appearance = [UITabBarAppearance new];
|
|
98
|
+
[appearance configureWithOpaqueBackground];
|
|
99
|
+
appearance.backgroundEffect = nil;
|
|
100
|
+
appearance.shadowColor = nil;
|
|
101
|
+
UIColor *resolvedColor = color ?: UIColor.systemBackgroundColor;
|
|
102
|
+
appearance.backgroundColor = resolvedColor;
|
|
103
|
+
appearance.backgroundImage = [UIImage imageWithSize:CGSizeMake(1, 1) color:resolvedColor];
|
|
104
|
+
return appearance;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
- (void)applyTabBarAppearance:(UITabBarAppearance *)appearance {
|
|
108
|
+
self.tabBar.standardAppearance = appearance;
|
|
109
|
+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000
|
|
110
|
+
if (@available(iOS 15.0, *)) {
|
|
111
|
+
self.tabBar.scrollEdgeAppearance = [appearance copy];
|
|
112
|
+
}
|
|
113
|
+
#endif
|
|
114
|
+
|
|
78
115
|
for (UIViewController *childViewController in self.tabBarController.childViewControllers) {
|
|
79
|
-
|
|
116
|
+
childViewController.tabBarItem.standardAppearance = [appearance copy];
|
|
80
117
|
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000
|
|
81
118
|
if (@available(iOS 15.0, *)) {
|
|
82
|
-
|
|
119
|
+
childViewController.tabBarItem.scrollEdgeAppearance = [appearance copy];
|
|
83
120
|
}
|
|
84
121
|
#endif
|
|
85
122
|
}
|
|
@@ -27,11 +27,12 @@
|
|
|
27
27
|
[bottomTabs setTabBarVisible:[withDefault.bottomTabs.visible withDefault:YES]];
|
|
28
28
|
|
|
29
29
|
[bottomTabs.view setBackgroundColor:[withDefault.layout.backgroundColor withDefault:nil]];
|
|
30
|
+
[bottomTabs setTabBarHideShadow:[withDefault.bottomTabs.hideShadow withDefault:NO]];
|
|
31
|
+
if (options.bottomTabs.barStyle.hasValue) {
|
|
32
|
+
[bottomTabs setTabBarStyle:[RNNConvert UIBarStyle:options.bottomTabs.barStyle.get]];
|
|
33
|
+
}
|
|
30
34
|
[self applyBackgroundColor:[withDefault.bottomTabs.backgroundColor withDefault:nil]
|
|
31
35
|
translucent:[withDefault.bottomTabs.translucent withDefault:NO]];
|
|
32
|
-
[bottomTabs setTabBarHideShadow:[withDefault.bottomTabs.hideShadow withDefault:NO]];
|
|
33
|
-
[bottomTabs setTabBarStyle:[RNNConvert UIBarStyle:[withDefault.bottomTabs.barStyle
|
|
34
|
-
withDefault:@"default"]]];
|
|
35
36
|
[self applyTabBarBorder:withDefault.bottomTabs];
|
|
36
37
|
[self applyTabBarShadow:withDefault.bottomTabs.shadow];
|
|
37
38
|
}
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
if (mergeOptions.bottomTabs.translucent.hasValue) {
|
|
68
|
-
[
|
|
69
|
+
[self setTabBarTranslucent:mergeOptions.bottomTabs.translucent.get];
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
if (mergeOptions.bottomTabs.hideShadow.hasValue) {
|
|
@@ -48,14 +48,27 @@
|
|
|
48
48
|
eventEmitter:eventEmitter
|
|
49
49
|
childViewControllers:childViewControllers];
|
|
50
50
|
|
|
51
|
-
if (@available(iOS
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
if (@available(iOS 26.0, *)) {
|
|
52
|
+
UITabBarAppearance *appearance = [UITabBarAppearance new];
|
|
53
|
+
[appearance configureWithTransparentBackground];
|
|
54
|
+
appearance.backgroundEffect = nil;
|
|
55
|
+
appearance.backgroundColor = UIColor.clearColor;
|
|
56
|
+
self.tabBar.standardAppearance = appearance;
|
|
57
|
+
self.tabBar.scrollEdgeAppearance = [appearance copy];
|
|
58
|
+
self.tabBar.barTintColor = UIColor.clearColor;
|
|
59
|
+
} else if (@available(iOS 13.0, *)) {
|
|
60
|
+
UITabBarAppearance *appearance = [UITabBarAppearance new];
|
|
61
|
+
[appearance configureWithOpaqueBackground];
|
|
62
|
+
appearance.backgroundEffect = nil;
|
|
63
|
+
appearance.backgroundColor = UIColor.systemBackgroundColor;
|
|
64
|
+
self.tabBar.standardAppearance = appearance;
|
|
54
65
|
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
66
|
+
if (@available(iOS 15.0, *)) {
|
|
67
|
+
self.tabBar.scrollEdgeAppearance = [appearance copy];
|
|
68
|
+
}
|
|
58
69
|
#endif
|
|
70
|
+
self.tabBar.translucent = NO;
|
|
71
|
+
}
|
|
59
72
|
|
|
60
73
|
[self createTabBarItems:childViewControllers];
|
|
61
74
|
|
|
@@ -72,7 +72,11 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
- (BOOL)shouldDrawBehind {
|
|
75
|
-
|
|
75
|
+
BOOL defaultDrawBehind = NO;
|
|
76
|
+
if (@available(iOS 26.0, *)) {
|
|
77
|
+
defaultDrawBehind = YES;
|
|
78
|
+
}
|
|
79
|
+
return [self.drawBehind withDefault:defaultDrawBehind] || [self.translucent withDefault:NO] ||
|
|
76
80
|
![self.visible withDefault:YES];
|
|
77
81
|
}
|
|
78
82
|
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
}];
|
|
92
92
|
self.reactView.backgroundColor = UIColor.clearColor;
|
|
93
93
|
self.reactView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
|
|
94
|
+
self.reactView.clipsToBounds = YES;
|
|
94
95
|
[self.reactView setFrame:self.view.frame];
|
|
95
96
|
[self.view addSubview:self.reactView];
|
|
96
97
|
[self updateReactViewFrame];
|
|
@@ -118,14 +119,15 @@
|
|
|
118
119
|
if (self.isViewLoaded && self.reactView) {
|
|
119
120
|
CGFloat bottomInset = self.shouldDrawBehindBottomTabs ? 0 : self.view.safeAreaInsets.bottom;
|
|
120
121
|
CGFloat topInset = self.shouldDrawBehindTopBar ? 0 : self.view.safeAreaInsets.top;
|
|
122
|
+
|
|
121
123
|
[self.reactView setFrame:CGRectMake(0, topInset, self.view.frame.size.width,
|
|
122
124
|
self.view.frame.size.height - topInset - bottomInset)];
|
|
123
125
|
}
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
- (BOOL)shouldDrawBehindBottomTabs {
|
|
127
|
-
return
|
|
128
|
-
|
|
129
|
+
return !self.tabBarController.tabBar || self.tabBarController.tabBar.isHidden ||
|
|
130
|
+
_drawBehindBottomTabs;
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
- (BOOL)shouldDrawBehindTopBar {
|
package/package.json
CHANGED