Closed Priyabaghelgithub closed 1 year ago
If you don't want them in the tab bar then you probably shouldn't add them as a tab. Please refer to the documentation of Shell on how to use the different options: https://learn.microsoft.com/xamarin/xamarin-forms/app-fundamentals/shell/
@jfversluis Can you suggest how to hide/Remove the "More" option from tha shell tab bar in iOS using shell renderer
`public class CustomShellRenderer : ShellRenderer
{
protected override IShellTabBarAppearanceTracker CreateTabBarAppearanceTracker() { return new CustomTabBarAppearanceTracker();
}
}
public class CustomTabBarAppearanceTracker : IShellTabBarAppearanceTracker
{ public void SetAppearance(UITabBarController controller, ShellAppearance appearance)
{ try
{
var count = controller.ViewControllers;
var len = controller.ViewControllers.Length;
if (controller != null && controller.ViewControllers != null && controller.ViewControllers.Length > 4)
{
var items = controller.ViewControllers;
var itemsToRemove = items.Skip(4).ToArray();
foreach (var item in itemsToRemove)
{
var tabBarItem = item.TabBarItem;
tabBarItem.Enabled = false;
}
}
}
catch (Exception ex)
{
Console.WriteLine("Ios ERROR" + ex.ToString());
}
}
public void Dispose() { }
public void ResetAppearance(UITabBarController controller) { }
public void UpdateLayout(UITabBarController controller) { }
} ` I have implemented this but ViewController.TabBarItem is taking null here
@jfversluis @jamesmontemagno
How do I hide the tabs more than 4 tabs in shell tabbar but keep them all item(8) in the flyout?
@jfversluis suggest how to hide/remove the more option from bottom she'll tab bar in iOS
want 8 tabs in the flyout menu only inside this and just want to 4tabs in the bottom tab bar how I limit the bottom tabbar to show only 4tabs in shell How to hide "More" option that include additional tabs in bottom she'll tabbar in Xamarin form for both Android and iOs
Gerald Versluis #James Mogamento
@jfversluis @jamesmontemagno