How to change the height of a Tab Bar in Xamarin.Forms (iOS)? Is it possible with TabbedRenderer?
Yeah this is possible to modify from a CustomRenderer
.
You will need to subclass the TabbedPage
in the Forms project and use this class to export the render.
Then in the CustomRenderer override the ViewWillLayoutSubviews
method. Something like:
public class MyTabbedPageRenderer : TabbedRenderer
{
// Modify this variable with the height you desire.
private readonly float tabBarHeight = 55f;
public override void ViewWillLayoutSubviews()
{
base.ViewWillLayoutSubviews();
TabBar.Frame = new CGRect(TabBar.Frame.X, TabBar.Frame.Y + (TabBar.Frame.Height - tabBarHeight), TabBar.Frame.Width, tabBarHeight);
}
}
Hope this helps.-
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With