hybrid-navigation 4.0.0 → 4.0.2
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/navigation/androidx/DrawerFragment.java +224 -12
- package/android/src/main/java/com/navigation/androidx/HybridDrawerLayout.java +636 -0
- package/android/src/main/java/com/navigation/androidx/StackFragment.java +4 -0
- package/android/src/main/java/com/navigation/androidx/TabBarFragment.java +4 -0
- package/android/src/main/java/com/reactnative/hybridnavigation/HBDRootView.java +36 -10
- package/android/src/main/java/com/reactnative/hybridnavigation/ReactAppCompatActivity.java +9 -0
- package/android/src/main/java/com/reactnative/hybridnavigation/ReactAppCompatActivityDelegate.java +1 -1
- package/android/src/main/java/com/reactnative/hybridnavigation/ReactFragment.java +2 -1
- package/android/src/main/java/com/reactnative/hybridnavigation/ReactSurfaceCleanup.java +54 -0
- package/android/src/main/res/layout/nav_fragment_drawer.xml +2 -2
- package/ios/Navigator/HBDStackNavigator.mm +1 -23
- package/ios/React/HBDNativeNavigation.mm +21 -5
- package/ios/ViewController/HBDDrawerController.mm +615 -87
- package/ios/ViewController/HBDNavigationController.mm +28 -1
- package/ios/ViewController/HBDViewController.mm +2 -2
- package/package.json +1 -1
- /package/dist/{src/DeepLink.d.ts → DeepLink.d.ts} +0 -0
- /package/dist/{src/DeepLink.js → DeepLink.js} +0 -0
- /package/dist/{src/NativeEvent.d.ts → NativeEvent.d.ts} +0 -0
- /package/dist/{src/NativeEvent.js → NativeEvent.js} +0 -0
- /package/dist/{src/NativeGarden.d.ts → NativeGarden.d.ts} +0 -0
- /package/dist/{src/NativeGarden.js → NativeGarden.js} +0 -0
- /package/dist/{src/NativeNavigation.d.ts → NativeNavigation.d.ts} +0 -0
- /package/dist/{src/NativeNavigation.js → NativeNavigation.js} +0 -0
- /package/dist/{src/Navigation.d.ts → Navigation.d.ts} +0 -0
- /package/dist/{src/Navigation.js → Navigation.js} +0 -0
- /package/dist/{src/NavigationComponentWrap.d.ts → NavigationComponentWrap.d.ts} +0 -0
- /package/dist/{src/NavigationComponentWrap.js → NavigationComponentWrap.js} +0 -0
- /package/dist/{src/Navigator.d.ts → Navigator.d.ts} +0 -0
- /package/dist/{src/Navigator.js → Navigator.js} +0 -0
- /package/dist/{src/Options.d.ts → Options.d.ts} +0 -0
- /package/dist/{src/Options.js → Options.js} +0 -0
- /package/dist/{src/Route.d.ts → Route.d.ts} +0 -0
- /package/dist/{src/Route.js → Route.js} +0 -0
- /package/dist/{src/handler → handler}/DispatchCommandHandler.d.ts +0 -0
- /package/dist/{src/handler → handler}/DispatchCommandHandler.js +0 -0
- /package/dist/{src/handler → handler}/LayoutCommandHandler.d.ts +0 -0
- /package/dist/{src/handler → handler}/LayoutCommandHandler.js +0 -0
- /package/dist/{src/handler → handler}/ResultEventHandler.d.ts +0 -0
- /package/dist/{src/handler → handler}/ResultEventHandler.js +0 -0
- /package/dist/{src/handler → handler}/VisibilityEventHandler.d.ts +0 -0
- /package/dist/{src/handler → handler}/VisibilityEventHandler.js +0 -0
- /package/dist/{src/hooks.d.ts → hooks.d.ts} +0 -0
- /package/dist/{src/hooks.js → hooks.js} +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/index.js → index.js} +0 -0
- /package/dist/{src/router → router}/drawer.d.ts +0 -0
- /package/dist/{src/router → router}/drawer.js +0 -0
- /package/dist/{src/router → router}/index.d.ts +0 -0
- /package/dist/{src/router → router}/index.js +0 -0
- /package/dist/{src/router → router}/screen.d.ts +0 -0
- /package/dist/{src/router → router}/screen.js +0 -0
- /package/dist/{src/router → router}/stack.d.ts +0 -0
- /package/dist/{src/router → router}/stack.js +0 -0
- /package/dist/{src/router → router}/tabs.d.ts +0 -0
- /package/dist/{src/router → router}/tabs.js +0 -0
- /package/dist/{src/store.d.ts → store.d.ts} +0 -0
- /package/dist/{src/store.js → store.js} +0 -0
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
- (UIGestureRecognizer *)superInteractivePopGestureRecognizer;
|
|
14
14
|
- (void)handleNavigationTransition:(UIScreenEdgePanGestureRecognizer *)pan;
|
|
15
|
+
- (void)hideSystemNavigationBar;
|
|
15
16
|
|
|
16
17
|
@end
|
|
17
18
|
|
|
@@ -54,6 +55,11 @@
|
|
|
54
55
|
return self.topViewController;
|
|
55
56
|
}
|
|
56
57
|
|
|
58
|
+
- (void)hideSystemNavigationBar {
|
|
59
|
+
[super setNavigationBarHidden:YES animated:NO];
|
|
60
|
+
self.navigationBar.hidden = YES;
|
|
61
|
+
}
|
|
62
|
+
|
|
57
63
|
- (void)viewDidLoad {
|
|
58
64
|
[super viewDidLoad];
|
|
59
65
|
self.definesPresentationContext = NO;
|
|
@@ -65,7 +71,21 @@
|
|
|
65
71
|
[self superInteractivePopGestureRecognizer].enabled = NO;
|
|
66
72
|
|
|
67
73
|
self.delegate = self;
|
|
68
|
-
[self
|
|
74
|
+
[self hideSystemNavigationBar];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
- (void)viewWillAppear:(BOOL)animated {
|
|
78
|
+
[super viewWillAppear:animated];
|
|
79
|
+
[self hideSystemNavigationBar];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
- (void)viewDidAppear:(BOOL)animated {
|
|
83
|
+
[super viewDidAppear:animated];
|
|
84
|
+
[self hideSystemNavigationBar];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
- (void)setNavigationBarHidden:(BOOL)hidden animated:(BOOL)animated {
|
|
88
|
+
[self hideSystemNavigationBar];
|
|
69
89
|
}
|
|
70
90
|
|
|
71
91
|
- (void)setDelegate:(id <UINavigationControllerDelegate>)delegate {
|
|
@@ -103,7 +123,14 @@
|
|
|
103
123
|
}
|
|
104
124
|
}
|
|
105
125
|
|
|
126
|
+
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
|
|
127
|
+
// 在转场动画开始前强制隐藏导航栏,防止第一次 push 时闪现系统返回按钮
|
|
128
|
+
[self hideSystemNavigationBar];
|
|
129
|
+
}
|
|
130
|
+
|
|
106
131
|
- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
|
|
132
|
+
[self hideSystemNavigationBar];
|
|
133
|
+
|
|
107
134
|
UIViewController *poppingVC = self.poppingViewController;
|
|
108
135
|
if (poppingVC && [poppingVC isKindOfClass:[HBDViewController class]]) {
|
|
109
136
|
[viewController didReceiveResultCode:poppingVC.resultCode resultData:poppingVC.resultData requestCode:0];
|
|
@@ -205,8 +205,8 @@
|
|
|
205
205
|
|
|
206
206
|
UITabBarItemAppearance *itemAppearance = appearance.standardAppearance.stackedLayoutAppearance;
|
|
207
207
|
if (unselectedIcon) {
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
tabBarItem.image = [[HBDUtils UIImage:unselectedIcon] withIconColor:nil badgeColor:dot ? tabBarItem.badgeColor : UIColor.clearColor];
|
|
209
|
+
tabBarItem.selectedImage = [[HBDUtils UIImage:icon] withIconColor:nil badgeColor:dot ? tabBarItem.badgeColor : UIColor.clearColor];
|
|
210
210
|
} else {
|
|
211
211
|
tabBarItem.image = [[HBDUtils UIImage:icon] withIconColor:itemAppearance.normal.iconColor badgeColor:dot ? tabBarItem.badgeColor : UIColor.clearColor];
|
|
212
212
|
tabBarItem.selectedImage = [[HBDUtils UIImage:icon] withIconColor:itemAppearance.selected.iconColor badgeColor:dot ? tabBarItem.badgeColor : UIColor.clearColor];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hybrid-navigation",
|
|
3
3
|
"description": "React Native Navigation that supports seamless navigation between Native and React.",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.2",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"module": "./dist/index",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|