mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-05-07 00:52:04 +08:00
Fix iOS back gesture handling (header config & touches)
This commit is contained in:
@@ -188,8 +188,21 @@
|
||||
|
||||
if (vc.transitionCoordinator != nil && !wasHidden) {
|
||||
[vc.transitionCoordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
|
||||
[self setAnimatedConfig:vc];
|
||||
|
||||
} completion:nil];
|
||||
[vc.transitionCoordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
|
||||
[self setAnimatedConfig:vc];
|
||||
} completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
|
||||
if ([context isCancelled]) {
|
||||
UIViewController* fromVC = [context viewControllerForKey:UITransitionContextFromViewControllerKey];
|
||||
for (UIView *subview in fromVC.view.reactSubviews) {
|
||||
if ([subview isKindOfClass:[RNSScreenStackHeaderConfig class]]) {
|
||||
[((RNSScreenStackHeaderConfig*) subview) setAnimatedConfig:fromVC];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}];
|
||||
} else {
|
||||
[self setAnimatedConfig:vc];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user