react-native-navigation 8.7.6-snapshot.2352 → 8.7.6-snapshot.2354
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.
- package/android/src/main/java/com/reactnativenavigation/react/NavigationModule.java +2 -2
- package/android/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/ButtonBar.kt +0 -2
- package/android/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/IconBackgroundDrawable.kt +17 -20
- package/android/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleAndButtonsMeasurer.kt +1 -2
- package/android/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleBarReactView.kt +10 -7
- package/android/src/main/res/values/styles.xml +0 -2
- package/ios/BottomTabsAppearancePresenter.mm +32 -69
- package/ios/BottomTabsBasePresenter.mm +4 -5
- package/ios/RCTHelpers.mm +1 -3
- package/ios/RNNAppDelegate.mm +0 -10
- package/ios/RNNBottomTabsController.mm +6 -19
- package/ios/RNNBottomTabsOptions.mm +1 -5
- package/ios/RNNBridgeManager.mm +0 -2
- package/ios/RNNComponentViewController.mm +2 -4
- package/ios/RNNModalHostViewManagerHandler.h +0 -5
- package/ios/RNNModalHostViewManagerHandler.mm +0 -2
- package/ios/RNNOverlayWindow.mm +2 -1
- package/ios/TopBarAppearancePresenter.mm +2 -9
- package/package.json +11 -11
|
@@ -232,11 +232,11 @@ public class NavigationModule extends ReactContextBaseJavaModule {
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
@Override
|
|
235
|
-
public void
|
|
235
|
+
public void onCatalystInstanceDestroy() {
|
|
236
236
|
final NavigationActivity navigationActivity = activity();
|
|
237
237
|
if (navigationActivity != null) {
|
|
238
238
|
navigationActivity.onCatalystInstanceDestroy();
|
|
239
239
|
}
|
|
240
|
-
super.
|
|
240
|
+
super.onCatalystInstanceDestroy();
|
|
241
241
|
}
|
|
242
242
|
}
|
package/android/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/ButtonBar.kt
CHANGED
|
@@ -11,7 +11,6 @@ import android.view.View
|
|
|
11
11
|
import android.view.ViewGroup
|
|
12
12
|
import androidx.appcompat.widget.ActionMenuView
|
|
13
13
|
import androidx.appcompat.widget.Toolbar
|
|
14
|
-
import com.reactnativenavigation.R
|
|
15
14
|
import com.reactnativenavigation.utils.ObjectUtils
|
|
16
15
|
import com.reactnativenavigation.utils.ViewUtils
|
|
17
16
|
import com.reactnativenavigation.viewcontrollers.stack.topbar.button.ButtonController
|
|
@@ -22,7 +21,6 @@ open class ButtonBar internal constructor(context: Context) : Toolbar(context) {
|
|
|
22
21
|
init {
|
|
23
22
|
super.setContentInsetsAbsolute(0, 0)
|
|
24
23
|
this.contentInsetStartWithNavigation = 0
|
|
25
|
-
setPopupTheme(R.style.TopBarOverflowPopup)
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
override fun onViewAdded(child: View) {
|
|
@@ -8,12 +8,12 @@ import com.reactnativenavigation.options.params.DensityPixel
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class IconBackgroundDrawable(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
private val wrapped: Drawable,
|
|
12
|
+
private val cornerRadius: DensityPixel,
|
|
13
|
+
private val backgroundWidth: Int,
|
|
14
|
+
private val backgroundHeight: Int,
|
|
15
|
+
private val iconColor: Int?,
|
|
16
|
+
val backgroundColor: Int?
|
|
17
17
|
) : Drawable() {
|
|
18
18
|
private val path: Path = Path()
|
|
19
19
|
private val bitmapPaint = Paint().apply {
|
|
@@ -56,31 +56,28 @@ class IconBackgroundDrawable(
|
|
|
56
56
|
canvas.drawBitmap(wrapped.toBitmap(), null, bitmapRect, bitmapPaint)
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
override fun getIntrinsicWidth(): Int = backgroundWidth
|
|
60
|
-
override fun getIntrinsicHeight(): Int = backgroundHeight
|
|
61
|
-
|
|
62
59
|
override fun setBounds(l: Int, t: Int, r: Int, b: Int) {
|
|
63
|
-
updatePath(RectF(
|
|
64
|
-
super.setBounds(l, t,
|
|
60
|
+
updatePath(RectF(l.toFloat(), t.toFloat(), backgroundWidth.toFloat(), backgroundHeight.toFloat()))
|
|
61
|
+
super.setBounds(l, t, backgroundWidth, backgroundHeight)
|
|
65
62
|
}
|
|
66
63
|
|
|
67
64
|
override fun setBounds(r: Rect) {
|
|
68
|
-
r.right =
|
|
69
|
-
r.bottom =
|
|
70
|
-
updatePath(RectF(
|
|
65
|
+
r.right = backgroundWidth
|
|
66
|
+
r.bottom = backgroundHeight
|
|
67
|
+
updatePath(RectF(r))
|
|
71
68
|
super.setBounds(r)
|
|
72
69
|
}
|
|
73
70
|
|
|
74
71
|
override fun onBoundsChange(bounds: Rect) {
|
|
75
72
|
if (bounds != null) {
|
|
76
73
|
backgroundRect = Rect((bounds.width() - backgroundWidth) / 2,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
(bounds.height() - backgroundHeight) / 2,
|
|
75
|
+
bounds.width() - (bounds.width() - backgroundWidth) / 2,
|
|
76
|
+
bounds.height() - (bounds.height() - backgroundHeight) / 2)
|
|
80
77
|
bitmapRect = Rect((bounds.width() - bitmapWidth) / 2,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
(bounds.height() - bitmapHeight) / 2,
|
|
79
|
+
bounds.width() - (bounds.width() - bitmapWidth) / 2,
|
|
80
|
+
bounds.height() - (bounds.height() - bitmapHeight) / 2)
|
|
84
81
|
}
|
|
85
82
|
super.onBoundsChange(bounds)
|
|
86
83
|
}
|
|
@@ -17,8 +17,7 @@ typealias TitleBottom = Int
|
|
|
17
17
|
|
|
18
18
|
fun makeTitleAtMostWidthMeasureSpec(containerWidth: Int, rightBarWidth: Int, leftBarWidth: Int, isCenter: Boolean, isFill: Boolean = false): Int {
|
|
19
19
|
return if (isCenter) {
|
|
20
|
-
|
|
21
|
-
View.MeasureSpec.makeMeasureSpec(availableWidth, View.MeasureSpec.AT_MOST)
|
|
20
|
+
View.MeasureSpec.makeMeasureSpec(containerWidth, View.MeasureSpec.AT_MOST)
|
|
22
21
|
} else {
|
|
23
22
|
val availableWidth = containerWidth - rightBarWidth - leftBarWidth - 2 * DEFAULT_LEFT_MARGIN_PX
|
|
24
23
|
View.MeasureSpec.makeMeasureSpec(
|
|
@@ -3,22 +3,25 @@ package com.reactnativenavigation.views.stack.topbar.titlebar
|
|
|
3
3
|
import android.annotation.SuppressLint
|
|
4
4
|
import android.content.Context
|
|
5
5
|
import android.view.View
|
|
6
|
+
import android.view.ViewGroup
|
|
7
|
+
import androidx.core.view.children
|
|
8
|
+
import com.facebook.react.ReactInstanceManager
|
|
6
9
|
import com.reactnativenavigation.react.ReactView
|
|
7
10
|
|
|
8
11
|
@SuppressLint("ViewConstructor")
|
|
9
12
|
class TitleBarReactView(context: Context?, componentId: String?,
|
|
10
13
|
componentName: String?) : ReactView(context, componentId, componentName) {
|
|
11
14
|
var centered: Boolean = false
|
|
12
|
-
|
|
13
15
|
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
|
16
|
+
var titleHeightMeasureSpec: Int
|
|
17
|
+
var titleWidthMeasureSpec: Int
|
|
14
18
|
if (centered) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST),
|
|
18
|
-
heightMeasureSpec
|
|
19
|
-
)
|
|
19
|
+
titleHeightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)
|
|
20
|
+
titleWidthMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)
|
|
20
21
|
} else {
|
|
21
|
-
|
|
22
|
+
titleHeightMeasureSpec = heightMeasureSpec
|
|
23
|
+
titleWidthMeasureSpec = widthMeasureSpec
|
|
22
24
|
}
|
|
25
|
+
super.onMeasure(titleWidthMeasureSpec, titleHeightMeasureSpec)
|
|
23
26
|
}
|
|
24
27
|
}
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
<item name="elevation">0dp</item>
|
|
5
5
|
</style>
|
|
6
6
|
|
|
7
|
-
<style name="TopBarOverflowPopup" parent="ThemeOverlay.AppCompat.Light" />
|
|
8
|
-
|
|
9
7
|
<!--The following is a workaround needed to run unit tests in command line-->
|
|
10
8
|
<style name="Widget.Support.CoordinatorLayout" parent="android:Widget">
|
|
11
9
|
@null
|
|
@@ -7,11 +7,6 @@
|
|
|
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
|
-
}
|
|
15
10
|
if (translucent)
|
|
16
11
|
[self setTabBarTranslucent:YES];
|
|
17
12
|
else if (backgroundColor.isTransparent)
|
|
@@ -24,33 +19,26 @@
|
|
|
24
19
|
|
|
25
20
|
- (void)applyTabBarBorder:(RNNBottomTabsOptions *)options {
|
|
26
21
|
if (options.borderColor.hasValue || options.borderWidth.hasValue) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
}
|
|
22
|
+
for (UIViewController *childViewController in self.tabBarController.childViewControllers)
|
|
23
|
+
childViewController.tabBarItem.standardAppearance.shadowImage = [UIImage
|
|
24
|
+
imageWithSize:CGSizeMake(1.0, [[options.borderWidth withDefault:@(0.1)] floatValue])
|
|
25
|
+
color:[options.borderColor withDefault:UIColor.blackColor]];
|
|
39
26
|
}
|
|
40
27
|
}
|
|
41
28
|
|
|
42
29
|
- (void)setTabBarBackgroundColor:(UIColor *)backgroundColor {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
30
|
+
[self setTabBarOpaqueBackground];
|
|
31
|
+
for (UIViewController *childViewController in self.tabBarController.childViewControllers) {
|
|
32
|
+
childViewController.tabBarItem.standardAppearance.backgroundColor = backgroundColor;
|
|
33
|
+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000
|
|
34
|
+
if (@available(iOS 15.0, *)) {
|
|
35
|
+
childViewController.tabBarItem.scrollEdgeAppearance.backgroundColor = backgroundColor;
|
|
36
|
+
}
|
|
37
|
+
#endif
|
|
49
38
|
}
|
|
50
39
|
}
|
|
51
40
|
|
|
52
41
|
- (void)setTabBarTranslucent:(BOOL)translucent {
|
|
53
|
-
self.tabBar.translucent = translucent;
|
|
54
42
|
if (translucent)
|
|
55
43
|
[self setTabBarTranslucentBackground];
|
|
56
44
|
else
|
|
@@ -60,63 +48,38 @@
|
|
|
60
48
|
#pragma mark - private
|
|
61
49
|
|
|
62
50
|
- (void)setTabBarDefaultBackground {
|
|
63
|
-
|
|
64
|
-
[self setTabBarTransparentBackground];
|
|
65
|
-
self.tabBar.backgroundColor = UIColor.clearColor;
|
|
66
|
-
} else {
|
|
67
|
-
[self setTabBarOpaqueBackground];
|
|
68
|
-
}
|
|
51
|
+
[self setTabBarOpaqueBackground];
|
|
69
52
|
}
|
|
70
53
|
|
|
71
54
|
- (void)setTabBarTranslucentBackground {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
55
|
+
for (UIViewController *childViewController in self.tabBarController.childViewControllers) {
|
|
56
|
+
[childViewController.tabBarItem.standardAppearance configureWithDefaultBackground];
|
|
57
|
+
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000
|
|
58
|
+
if (@available(iOS 15.0, *)) {
|
|
59
|
+
[childViewController.tabBarItem.scrollEdgeAppearance configureWithDefaultBackground];
|
|
60
|
+
}
|
|
61
|
+
#endif
|
|
62
|
+
}
|
|
76
63
|
}
|
|
77
64
|
|
|
78
65
|
- (void)setTabBarTransparentBackground {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
appearance.backgroundEffect = nil;
|
|
82
|
-
appearance.backgroundColor = UIColor.clearColor;
|
|
83
|
-
[self applyTabBarAppearance:appearance];
|
|
84
|
-
self.tabBar.barTintColor = UIColor.clearColor;
|
|
85
|
-
}
|
|
86
|
-
|
|
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;
|
|
66
|
+
for (UIViewController *childViewController in self.tabBarController.childViewControllers) {
|
|
67
|
+
[childViewController.tabBarItem.standardAppearance configureWithTransparentBackground];
|
|
109
68
|
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
69
|
+
if (@available(iOS 15.0, *)) {
|
|
70
|
+
[childViewController.tabBarItem
|
|
71
|
+
.scrollEdgeAppearance configureWithTransparentBackground];
|
|
72
|
+
}
|
|
113
73
|
#endif
|
|
74
|
+
}
|
|
75
|
+
}
|
|
114
76
|
|
|
77
|
+
- (void)setTabBarOpaqueBackground {
|
|
115
78
|
for (UIViewController *childViewController in self.tabBarController.childViewControllers) {
|
|
116
|
-
childViewController.tabBarItem.standardAppearance
|
|
79
|
+
[childViewController.tabBarItem.standardAppearance configureWithOpaqueBackground];
|
|
117
80
|
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000
|
|
118
81
|
if (@available(iOS 15.0, *)) {
|
|
119
|
-
childViewController.tabBarItem.scrollEdgeAppearance
|
|
82
|
+
[childViewController.tabBarItem.scrollEdgeAppearance configureWithOpaqueBackground];
|
|
120
83
|
}
|
|
121
84
|
#endif
|
|
122
85
|
}
|
|
@@ -27,12 +27,11 @@
|
|
|
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
|
-
}
|
|
34
30
|
[self applyBackgroundColor:[withDefault.bottomTabs.backgroundColor withDefault:nil]
|
|
35
31
|
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"]]];
|
|
36
35
|
[self applyTabBarBorder:withDefault.bottomTabs];
|
|
37
36
|
[self applyTabBarShadow:withDefault.bottomTabs.shadow];
|
|
38
37
|
}
|
|
@@ -66,7 +65,7 @@
|
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
if (mergeOptions.bottomTabs.translucent.hasValue) {
|
|
69
|
-
[
|
|
68
|
+
[bottomTabs setTabBarTranslucent:mergeOptions.bottomTabs.translucent.get];
|
|
70
69
|
}
|
|
71
70
|
|
|
72
71
|
if (mergeOptions.bottomTabs.hideShadow.hasValue) {
|
package/ios/RCTHelpers.mm
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
#import "RCTHelpers.h"
|
|
2
2
|
#import <React/RCTFont.h>
|
|
3
|
-
#if __has_include(<React/RCTScrollView.h>)
|
|
4
3
|
#import <React/RCTScrollView.h>
|
|
5
|
-
#endif
|
|
6
4
|
#import <React/RCTView.h>
|
|
7
5
|
|
|
8
6
|
@implementation RCTHelpers
|
|
@@ -203,7 +201,7 @@
|
|
|
203
201
|
UIView *yelloboxParentView = view;
|
|
204
202
|
while (view.superview != nil) {
|
|
205
203
|
yelloboxParentView = yelloboxParentView.superview;
|
|
206
|
-
if ([yelloboxParentView isKindOfClass:
|
|
204
|
+
if ([yelloboxParentView isKindOfClass:[RCTScrollView class]]) {
|
|
207
205
|
yelloboxParentView = yelloboxParentView.superview;
|
|
208
206
|
break;
|
|
209
207
|
}
|
package/ios/RNNAppDelegate.mm
CHANGED
|
@@ -5,17 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
#import "RCTAppSetupUtils.h"
|
|
7
7
|
#import <React/CoreModulesPlugins.h>
|
|
8
|
-
#if __has_include(<React/RCTCxxBridgeDelegate.h>)
|
|
9
8
|
#import <React/RCTCxxBridgeDelegate.h>
|
|
10
|
-
#endif
|
|
11
9
|
#import <React/RCTLegacyViewManagerInteropComponentView.h>
|
|
12
10
|
#import <React/RCTSurfacePresenter.h>
|
|
13
|
-
#if __has_include(<React/RCTSurfacePresenterStub.h>)
|
|
14
11
|
#import <React/RCTSurfacePresenterStub.h>
|
|
15
|
-
#endif
|
|
16
|
-
#if __has_include(<React/RCTSurfacePresenterBridgeAdapter.h>)
|
|
17
12
|
#import <React/RCTSurfacePresenterBridgeAdapter.h>
|
|
18
|
-
#endif
|
|
19
13
|
#import <ReactCommon/RCTTurboModuleManager.h>
|
|
20
14
|
|
|
21
15
|
#if __has_include(<react/config/ReactNativeConfig.h>)
|
|
@@ -25,13 +19,9 @@
|
|
|
25
19
|
#import <react/renderer/runtimescheduler/RuntimeScheduler.h>
|
|
26
20
|
#import <react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h>
|
|
27
21
|
#import <React/RCTSurfacePresenter.h>
|
|
28
|
-
#if __has_include(<React/RCTBridge+Private.h>)
|
|
29
22
|
#import <React/RCTBridge+Private.h>
|
|
30
|
-
#endif
|
|
31
23
|
#import <React/RCTImageLoader.h>
|
|
32
|
-
#if __has_include(<React/RCTBridgeProxy.h>)
|
|
33
24
|
#import <React/RCTBridgeProxy.h>
|
|
34
|
-
#endif
|
|
35
25
|
#import <React/RCTSurfacePresenter.h>
|
|
36
26
|
#import <react/utils/ManagedObjectWrapper.h>
|
|
37
27
|
|
|
@@ -48,27 +48,14 @@
|
|
|
48
48
|
eventEmitter:eventEmitter
|
|
49
49
|
childViewControllers:childViewControllers];
|
|
50
50
|
|
|
51
|
-
if (@available(iOS
|
|
52
|
-
|
|
53
|
-
|
|
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;
|
|
51
|
+
if (@available(iOS 13.0, *)) {
|
|
52
|
+
self.tabBar.standardAppearance = [UITabBarAppearance new];
|
|
53
|
+
}
|
|
65
54
|
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
#endif
|
|
70
|
-
self.tabBar.translucent = NO;
|
|
55
|
+
if (@available(iOS 15.0, *)) {
|
|
56
|
+
self.tabBar.scrollEdgeAppearance = [UITabBarAppearance new];
|
|
71
57
|
}
|
|
58
|
+
#endif
|
|
72
59
|
|
|
73
60
|
[self createTabBarItems:childViewControllers];
|
|
74
61
|
|
|
@@ -72,11 +72,7 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
- (BOOL)shouldDrawBehind {
|
|
75
|
-
|
|
76
|
-
if (@available(iOS 26.0, *)) {
|
|
77
|
-
defaultDrawBehind = YES;
|
|
78
|
-
}
|
|
79
|
-
return [self.drawBehind withDefault:defaultDrawBehind] || [self.translucent withDefault:NO] ||
|
|
75
|
+
return [self.drawBehind withDefault:NO] || [self.translucent withDefault:NO] ||
|
|
80
76
|
![self.visible withDefault:YES];
|
|
81
77
|
}
|
|
82
78
|
|
package/ios/RNNBridgeManager.mm
CHANGED
|
@@ -107,10 +107,8 @@
|
|
|
107
107
|
|
|
108
108
|
- (void)onJavaScriptLoaded {
|
|
109
109
|
[_commandsHandler setReadyToReceiveCommands:true];
|
|
110
|
-
#ifndef RCT_REMOVE_LEGACY_ARCH
|
|
111
110
|
[_modalHostViewHandler
|
|
112
111
|
connectModalHostViewManager:[self.bridge moduleForClass:RCTModalHostViewManager.class]];
|
|
113
|
-
#endif
|
|
114
112
|
[[_bridge moduleForClass:[RNNBridgeEventEmitter class]] sendOnAppLaunched];
|
|
115
113
|
}
|
|
116
114
|
|
|
@@ -91,7 +91,6 @@
|
|
|
91
91
|
}];
|
|
92
92
|
self.reactView.backgroundColor = UIColor.clearColor;
|
|
93
93
|
self.reactView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
|
|
94
|
-
self.reactView.clipsToBounds = YES;
|
|
95
94
|
[self.reactView setFrame:self.view.frame];
|
|
96
95
|
[self.view addSubview:self.reactView];
|
|
97
96
|
[self updateReactViewFrame];
|
|
@@ -119,15 +118,14 @@
|
|
|
119
118
|
if (self.isViewLoaded && self.reactView) {
|
|
120
119
|
CGFloat bottomInset = self.shouldDrawBehindBottomTabs ? 0 : self.view.safeAreaInsets.bottom;
|
|
121
120
|
CGFloat topInset = self.shouldDrawBehindTopBar ? 0 : self.view.safeAreaInsets.top;
|
|
122
|
-
|
|
123
121
|
[self.reactView setFrame:CGRectMake(0, topInset, self.view.frame.size.width,
|
|
124
122
|
self.view.frame.size.height - topInset - bottomInset)];
|
|
125
123
|
}
|
|
126
124
|
}
|
|
127
125
|
|
|
128
126
|
- (BOOL)shouldDrawBehindBottomTabs {
|
|
129
|
-
return !self.tabBarController.tabBar || self.tabBarController.tabBar.isHidden ||
|
|
130
|
-
|
|
127
|
+
return (!self.tabBarController.tabBar || self.tabBarController.tabBar.isHidden ||
|
|
128
|
+
_drawBehindBottomTabs);
|
|
131
129
|
}
|
|
132
130
|
|
|
133
131
|
- (BOOL)shouldDrawBehindTopBar {
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
#import "RNNModalManager.h"
|
|
2
2
|
#import <Foundation/Foundation.h>
|
|
3
|
-
|
|
4
|
-
#ifndef RCT_REMOVE_LEGACY_ARCH
|
|
5
3
|
#import <React/RCTModalHostViewManager.h>
|
|
6
|
-
#endif
|
|
7
4
|
|
|
8
5
|
@interface RNNModalHostViewManagerHandler : NSObject
|
|
9
6
|
|
|
10
7
|
- (instancetype)initWithModalManager:(RNNModalManager *)modalManager;
|
|
11
8
|
|
|
12
|
-
#ifndef RCT_REMOVE_LEGACY_ARCH
|
|
13
9
|
- (void)connectModalHostViewManager:(RCTModalHostViewManager *)modalHostViewManager;
|
|
14
|
-
#endif
|
|
15
10
|
|
|
16
11
|
@end
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
return self;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
#ifndef RCT_REMOVE_LEGACY_ARCH
|
|
14
13
|
- (void)connectModalHostViewManager:(RCTModalHostViewManager *)modalHostViewManager {
|
|
15
14
|
modalHostViewManager.presentationBlock =
|
|
16
15
|
^(UIViewController *reactViewController, UIViewController *viewController, BOOL animated,
|
|
@@ -37,6 +36,5 @@
|
|
|
37
36
|
}];
|
|
38
37
|
};
|
|
39
38
|
}
|
|
40
|
-
#endif
|
|
41
39
|
|
|
42
40
|
@end
|
package/ios/RNNOverlayWindow.mm
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#import "RNNOverlayWindow.h"
|
|
2
2
|
#import "RNNReactView.h"
|
|
3
|
+
#import <React/RCTModalHostView.h>
|
|
3
4
|
|
|
4
5
|
@implementation RNNOverlayWindow
|
|
5
6
|
|
|
@@ -8,7 +9,7 @@
|
|
|
8
9
|
|
|
9
10
|
if ([hitTestResult isKindOfClass:[UIWindow class]] ||
|
|
10
11
|
[hitTestResult.subviews.firstObject isKindOfClass:RNNReactView.class] ||
|
|
11
|
-
[hitTestResult isKindOfClass:
|
|
12
|
+
[hitTestResult isKindOfClass:[RCTModalHostView class]] ||
|
|
12
13
|
[hitTestResult isKindOfClass:NSClassFromString(@"RCTRootComponentView")]) {
|
|
13
14
|
return nil;
|
|
14
15
|
}
|
|
@@ -22,10 +22,8 @@
|
|
|
22
22
|
|
|
23
23
|
[self setTitleAttributes:options.title];
|
|
24
24
|
[self setLargeTitleAttributes:options.largeTitle];
|
|
25
|
-
if (options.scrollEdgeAppearance.title.hasValue) {
|
|
25
|
+
if (options.scrollEdgeAppearance.title && [options.scrollEdgeAppearance.title hasValue]) {
|
|
26
26
|
[self setScrollEdgeTitleAttributes:options.scrollEdgeAppearance.title];
|
|
27
|
-
} else {
|
|
28
|
-
[self setScrollEdgeTitleAttributes:options.title];
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
[self setBorderColor:[options.borderColor withDefault:nil]];
|
|
@@ -55,12 +53,6 @@
|
|
|
55
53
|
if (options.scrollEdgeAppearance.noBorder.hasValue) {
|
|
56
54
|
[self showScrollEdgeBorder:!options.scrollEdgeAppearance.noBorder.get];
|
|
57
55
|
}
|
|
58
|
-
|
|
59
|
-
if (options.scrollEdgeAppearance.title.hasValue) {
|
|
60
|
-
[self setScrollEdgeTitleAttributes:defaultOptions.scrollEdgeAppearance.title];
|
|
61
|
-
} else if (options.title.hasValue && !defaultOptions.scrollEdgeAppearance.title.hasValue) {
|
|
62
|
-
[self setScrollEdgeTitleAttributes:defaultOptions.title];
|
|
63
|
-
}
|
|
64
56
|
}
|
|
65
57
|
|
|
66
58
|
- (void)setTranslucent:(BOOL)translucent {
|
|
@@ -168,6 +160,7 @@
|
|
|
168
160
|
}
|
|
169
161
|
|
|
170
162
|
self.getAppearance.titleTextAttributes = titleTextAttributes;
|
|
163
|
+
self.getScrollEdgeAppearance.titleTextAttributes = titleTextAttributes;
|
|
171
164
|
}
|
|
172
165
|
|
|
173
166
|
- (void)setScrollEdgeTitleAttributes:(RNNTitleOptions *)titleOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-navigation",
|
|
3
|
-
"version": "8.7.6-snapshot.
|
|
3
|
+
"version": "8.7.6-snapshot.2354",
|
|
4
4
|
"description": "React Native Navigation - truly native navigation for iOS and Android",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"nativePackage": true,
|
|
@@ -94,16 +94,15 @@
|
|
|
94
94
|
"@babel/preset-env": "^7.25.3",
|
|
95
95
|
"@babel/runtime": "^7.25.0",
|
|
96
96
|
"@babel/types": "7.25.0",
|
|
97
|
-
"@d11/react-native-fast-image": "^8.13.0",
|
|
98
97
|
"@react-native-community/cli": "20.0.0",
|
|
99
98
|
"@react-native-community/cli-platform-android": "20.0.0",
|
|
100
99
|
"@react-native-community/cli-platform-ios": "20.0.0",
|
|
101
100
|
"@react-native-community/datetimepicker": "^8.2.0",
|
|
102
101
|
"@react-native-community/netinfo": "^11.4.1",
|
|
103
|
-
"@react-native/babel-preset": "0.
|
|
104
|
-
"@react-native/eslint-config": "0.
|
|
105
|
-
"@react-native/metro-config": "0.
|
|
106
|
-
"@react-native/typescript-config": "0.
|
|
102
|
+
"@react-native/babel-preset": "0.83.0",
|
|
103
|
+
"@react-native/eslint-config": "0.83.0",
|
|
104
|
+
"@react-native/metro-config": "0.83.0",
|
|
105
|
+
"@react-native/typescript-config": "0.83.0",
|
|
107
106
|
"@testing-library/jest-native": "^5.4.2",
|
|
108
107
|
"@testing-library/react-native": "^13.0.1",
|
|
109
108
|
"@types/hoist-non-react-statics": "^3.3.6",
|
|
@@ -131,14 +130,15 @@
|
|
|
131
130
|
"pixelmatch": "^5.2.1",
|
|
132
131
|
"pngjs": "^6.0.0",
|
|
133
132
|
"prettier": "2.8.8",
|
|
134
|
-
"react": "19.2.
|
|
135
|
-
"react-native": "0.
|
|
133
|
+
"react": "19.2.0",
|
|
134
|
+
"react-native": "0.83.0",
|
|
136
135
|
"react-native-builder-bob": "^0.40.13",
|
|
136
|
+
"react-native-fast-image": "^8.6.3",
|
|
137
137
|
"react-native-gesture-handler": "^2.29.1",
|
|
138
|
-
"react-native-reanimated": "4.
|
|
139
|
-
"react-native-worklets": "0.
|
|
138
|
+
"react-native-reanimated": "4.1.5",
|
|
139
|
+
"react-native-worklets": "0.5.0",
|
|
140
140
|
"react-redux": "9.1.2",
|
|
141
|
-
"react-test-renderer": "19.2.
|
|
141
|
+
"react-test-renderer": "19.2.0",
|
|
142
142
|
"redux": "^5.0.1",
|
|
143
143
|
"remx": "3.x.x",
|
|
144
144
|
"semver": "5.x.x",
|