Back gesture doesn't work when topBar or backButton's visible set to false
Navigation.push(this.props.componentId, {
component: {
name: 'example.PushedScreen',
passProps: {
text: 'Pushed screen'
},
options: {
topBar: {
visible: false
}
}
}
});
or
Navigation.push(this.props.componentId, {
component: {
name: 'example.PushedScreen',
passProps: {
text: 'Pushed screen'
},
options: {
topBar: {
backButton: {
visible: false
}
}
}
}
});
I encountered the same issue today. After some googling I came across this Native iOS issue on Stackoverflow.
However, my iOS experience is extremely limited. So I'm not able to verify or try to fix the problem myself.
Doesn't matter (in my case) if it's hidden or not. As soon as you're using custom left button, the gesture is gone! Was using 2.1.3 and it was working fine (now on 2.2.5).
It's still happening on 2.4.0, any idea how to fix it?
@ptfly I still have the same problem on 2.5.0.
Probably a very dirty fix. Since I don't have any experience in iOS.
I did some testing with answers from the stackoverflow page @SasjaVDD suggested.
This works for me:
- (void)rnn_setNavigationBarVisible:(BOOL)visible animated:(BOOL)animated {
[self setNavigationBarHidden:!visible animated:animated];
}
- (void)rnn_setNavigationBarVisible:(BOOL)visible animated:(BOOL)animated {
[self setNavigationBarHidden:!visible animated:animated];
// enable slide-back
if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
self.interactivePopGestureRecognizer.enabled = YES;
self.interactivePopGestureRecognizer.delegate = nil;
}
}
I'm setting a delegate to nil. I don't know what the unintended consequences are.
Also seeing this issue when upgrading to 2.2.5
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
It's not stale - I'm still having this issue
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
This is still relevant :-) There's a PR up fixing the problem since two months, I think it deserves a review.
Is this released already?
Is this fixed? I'm on 3.0.0-alpha.10 and it seems not to work
Most helpful comment
It's not stale - I'm still having this issue