forXifLess / LinkNavigator

🌊 Easy & Powerful navigation library in SwiftUI
Other
331 stars 23 forks source link

How to Push view to Hide Tabbar? #37

Closed 350887156 closed 1 month ago

350887156 commented 1 month ago

How to Push view to Hide Tabbar?

97chos commented 1 month ago

Hi, @350887156. Thank you for using LinkNavigator!

Since you didn't provide the specific code or detailed requirements you want to apply, I can't offer a detailed solution, but you can declare TabLinkNavigationView with isHiddenDefaultTabbar set to false and customize the Tabbar in the main pages of each tab.

If you have any additional questions, please leave a comment.

Thank you.

njraweng commented 5 days ago

Hi @97chos,

Can we hide the tab bar when a view is pushed and show it again when the view is popped? I have checked TabLinkNavigationView with isHiddenDefaultTabbar set to false, but our use case requires hiding the tab bar on push.

Our use case is as follows:

We have 4 tabs in the tab bar: Tab1, Tab2, Tab3, Tab4. When we push a view on Tab1 (namely DetailView), the tab bar should hide. When the pushed view (DetailView) is popped, the tab bar should be visible again. Is this achievable via LinkNavigator?

Thank you.

njraweng commented 5 days ago

@97chos @350887156 @zooxop @lks574 I have raised a pull request for the feature to hide tab bar when the view is pushed Please review it and let me know if you have any feedbacks https://github.com/forXifLess/LinkNavigator/pull/39

97chos commented 2 days ago

Hello, @njraweng !

Thank you for using LinkNavigator in your project.

For your use case, you can hide the DefaultTabbar and implement a CustomTabbar instead. This way, you can implement the Tabbar only on the page corresponding to Tab1 and not on any other pages.

We have also reviewed the excellent PR you submitted. It will be reviewed internally and integrated, though this may take some time due to internal processes.

In the meantime, I recommend solving the issue with the method I proposed above until the PR is integrated.

Thank you for your interest!