hybrid-navigation 2.7.3 → 2.7.4
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/CHANGELOG.md +10 -0
- package/android/build.gradle +1 -1
- package/ios/HybridNavigation/Navigator/HBDScreenNavigator.m +0 -7
- package/ios/HybridNavigation/ViewController/HBDModalViewController.m +6 -4
- package/ios/HybridNavigation/ViewController/HBDNavigationController.m +4 -1
- package/ios/HybridNavigation/ViewController/UIViewController+HBD.m +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/android/build.gradle
CHANGED
|
@@ -33,5 +33,5 @@ dependencies {
|
|
|
33
33
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
34
34
|
implementation 'com.facebook.react:react-native:+'
|
|
35
35
|
// api project(':navigation')
|
|
36
|
-
api 'io.github.listenzz:AndroidNavigation:12.0.
|
|
36
|
+
api 'io.github.listenzz:AndroidNavigation:12.0.4'
|
|
37
37
|
}
|
|
@@ -75,16 +75,11 @@
|
|
|
75
75
|
HBDNavigationController *navVC = [[HBDNavigationController alloc] initWithRootViewController:viewController];
|
|
76
76
|
navVC.modalPresentationStyle = UIModalPresentationCurrentContext;
|
|
77
77
|
[navVC setRequestCode:requestCode];
|
|
78
|
-
[target beginAppearanceTransition:NO animated:YES];
|
|
79
|
-
[target endAppearanceTransition];
|
|
80
78
|
[target presentViewController:navVC animated:YES completion:^{
|
|
81
79
|
resolve(@(YES));
|
|
82
80
|
}];
|
|
83
81
|
} else if ([action isEqualToString:@"dismiss"]) {
|
|
84
82
|
UIViewController *presenting = target.presentingViewController;
|
|
85
|
-
// make sure extra lifecycle excuting order
|
|
86
|
-
[target beginAppearanceTransition:NO animated:YES];
|
|
87
|
-
[target endAppearanceTransition];
|
|
88
83
|
if (presenting) {
|
|
89
84
|
[presenting dismissViewControllerAnimated:YES completion:^{
|
|
90
85
|
resolve(@(YES));
|
|
@@ -110,8 +105,6 @@
|
|
|
110
105
|
viewController = [[HBDReactBridgeManager get] controllerWithLayout:layout];
|
|
111
106
|
[viewController setRequestCode:requestCode];
|
|
112
107
|
viewController.modalPresentationStyle = UIModalPresentationCurrentContext;
|
|
113
|
-
[target beginAppearanceTransition:NO animated:YES];
|
|
114
|
-
[target endAppearanceTransition];
|
|
115
108
|
[target presentViewController:viewController animated:YES completion:^{
|
|
116
109
|
resolve(@(YES));
|
|
117
110
|
}];
|
|
@@ -429,10 +429,11 @@
|
|
|
429
429
|
|
|
430
430
|
- (void)hbd_showViewController:(UIViewController *)vc requestCode:(NSInteger)requestCode animated:(BOOL)animated completion:(void (^)(BOOL))completion {
|
|
431
431
|
if (![self canShowModal]) {
|
|
432
|
+
[self didReceiveResultCode:0 resultData:nil requestCode:requestCode];
|
|
433
|
+
|
|
432
434
|
if (completion) {
|
|
433
435
|
completion(NO);
|
|
434
436
|
}
|
|
435
|
-
[self didReceiveResultCode:0 resultData:nil requestCode:requestCode];
|
|
436
437
|
return;
|
|
437
438
|
}
|
|
438
439
|
|
|
@@ -482,13 +483,14 @@
|
|
|
482
483
|
}
|
|
483
484
|
|
|
484
485
|
[self.hbd_modalViewController hideWithAnimated:animated completion:^(BOOL finished) {
|
|
485
|
-
if (completion) {
|
|
486
|
-
completion(finished);
|
|
487
|
-
}
|
|
488
486
|
UIViewController *target = self.hbd_targetViewController;
|
|
489
487
|
[target beginAppearanceTransition:YES animated:YES];
|
|
490
488
|
[target endAppearanceTransition];
|
|
491
489
|
[target didReceiveResultCode:self.resultCode resultData:self.resultData requestCode:self.requestCode];
|
|
490
|
+
|
|
491
|
+
if (completion) {
|
|
492
|
+
completion(finished);
|
|
493
|
+
}
|
|
492
494
|
}];
|
|
493
495
|
}
|
|
494
496
|
|
|
@@ -135,7 +135,10 @@ void printViewHierarchy(UIView *view, NSString *prefix) {
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer API_AVAILABLE(ios(7.0)){
|
|
138
|
-
|
|
138
|
+
if (gestureRecognizer == self.nav.interactivePopGestureRecognizer) {
|
|
139
|
+
return YES;
|
|
140
|
+
}
|
|
141
|
+
return NO;
|
|
139
142
|
}
|
|
140
143
|
|
|
141
144
|
- (void)handleNavigationTransition:(UIScreenEdgePanGestureRecognizer *)pan {
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
|
|
41
41
|
- (void)hbd_presentViewController:(UIViewController *)viewController animated:(BOOL)flag completion:(void (^)(void))completion {
|
|
42
42
|
if (![self canPresentViewController]) {
|
|
43
|
+
[self didReceiveResultCode:0 resultData:nil requestCode:viewController.requestCode];
|
|
43
44
|
if (completion) {
|
|
44
45
|
completion();
|
|
45
46
|
}
|
|
46
|
-
[self didReceiveResultCode:0 resultData:nil requestCode:viewController.requestCode];
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
[self hbd_presentViewController:viewController animated:flag completion:completion];
|
|
@@ -81,13 +81,13 @@
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
[self hbd_dismissViewControllerAnimated:animated completion:^{
|
|
84
|
-
if (completion) {
|
|
85
|
-
completion();
|
|
86
|
-
}
|
|
87
|
-
|
|
88
84
|
if (![presented isKindOfClass:[UIAlertController class]]) {
|
|
89
85
|
[presenting didReceiveResultCode:presented.resultCode resultData:presented.resultData requestCode:presented.requestCode];
|
|
90
86
|
}
|
|
87
|
+
|
|
88
|
+
if (completion) {
|
|
89
|
+
completion();
|
|
90
|
+
}
|
|
91
91
|
}];
|
|
92
92
|
}
|
|
93
93
|
|