How to hide Tab Bar on push in Xamarin.Forms?

前端 未结 4 1179
野性不改
野性不改 2021-01-14 16:04

I\'m struggling for last few days with TabbedPage in Xamarin.Forms on iOS. I found some solutions like those: https://forums.xamarin.com/discussion/20901/hide-t

4条回答
  •  無奈伤痛
    2021-01-14 16:33

    There is a solution that doesn't require any renders and works on both Android and iOS.

    Wrap the TabbedPage in a NavigationPage so the structure of your app becomes

    • NavigationPage (root)
      • TappedPage
        • NavigationPage
          • ContentPage (with tabbar)
      • ContentPage (without tabbar)

    On the TabbedPage you have to hide the navigationbar of the 'root' NavigationPage, otherwise you have 2 navbars.

     
    

    If you push a page using the 'root' NavigationPage, the tabbar is hidden and there is no blank space at the bottom.

    See my example at: https://github.com/Jfcobuss/HideTabbarExample/tree/master/HideTabbarExample

提交回复
热议问题