Open markhomoki opened 3 years ago
This looks like an iOS bug where the system doesn't take hidesBottomBarWhenPushed
into consideration when the first UITabBarController
child is different than UINavigationController
. Managed to reproduce it in a plain iOS project.
I think that our best option is to add a workaround that will manually hide the bottomTabs
in this specific case.
What would the best way to hide manually in that case? I tried to apply static options which didn't hide it. When I used Navigation.mergeOptions then it was a flash and the UX wasn't the same as navigating from a Bottom Tab screen.
Would it be an option to check somehow whether it's from sideMenu or not inside hidesBottomBarWhenPushed
and use self.boundViewController.resolveOptions
when navigating from sideMenu?
@yogevbd Is there anything you can recommend us looking into and potentially apply a fix? Upgrading Android fixed lot of issues for us and now we are maintaining 2 branches, which is not ideal. One for Android with upgraded RNN, and another one for iOS with the old RNN.
Any suggestions are welcome. We will try to allocate some time next week to solve this.
Same issue in 7.37.1 Any workarounds?
🐛 Bug Report
Cannot hide bottomTabs when pushing to a new Bottom Tabs Screen from Side Menu. Using Navigation.push() from any other Bottom Tabs screens passes
bottomTabs: { visible: false }
but when calling from a Side Menu screen it does not. This used to work in v4, but started migrating to v7 this week and blocked by this issue.Any help or pointing to the right direction is appreciated.
Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
Tried to debug the native code and I believe the issue is related to
topMostViewController
, which got called inReactNativeNavigation/RNNBasePresenter.m
hidesBottomBarWhenPushed
.In that function, changing
self.boundViewController.topMostViewController.resolveOptions
toself.boundViewController.resolveOptions
fixes the issue, but I'm afraid that it will have side effects.When pushing inside Bottom Tabs from Bottom Tabs:
bottomTabs.visible: NO
andbottomTabs.visible: NO
When pushing inside Bottom Tabs from Side Menu:
bottomTabs.visible: nil
whilebottomTabs.visible: NO
Because
bottomTabs.visible: nil
, the code relies onself.defaultOptions
and during merge it setsbottomTabs.visible: YES
.Expected behavior
When using Navigation.push method should respect
options
property.Actual Behavior
Passing
options
property to Navigation.push doesn't get applied when push happens from Side Menu screen.Your Environment