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
What I have tried :
Create subclass of ContentPage and create BindableProperty(like HidesBottomBarWhenPushed
) inside it. I set ViewController.hidesBottomBarWhenPushed
in PageRenderer but it doesn't work, although I can get the value of this property .
set this.hidesBottomBarWhenPushed
in the initial constructor in PageRenderer , still no luck.
I think it must be something wrong with hidesBottomBarWhenPushed
, we can not hide tabbar by this way. As a temporary and simple workaround , I change the Visible of TabBarController.TabBar
in PageRenderer
class PageiOS : PageRenderer
{
public override void ViewWillAppear(bool animated)
{
base.ViewWillAppear(animated);
if (this.NavigationController != null && this.TabBarController != null)
{
bool isRootVC = this.NavigationController.ViewControllers.Length == 1;
ParentViewController.TabBarController.TabBar.Hidden = !isRootVC;
}
}
}
It behaves like what you said above , there is some delay and blank space on the bottom . I disable the animation on the push and pop , and the issue disappeared.
Test: