IOS -Tabbar not showing after navigating from a contentpage where Shell.TabBarIsVisible="False"

Shraddha Chauhan 0 Reputation points
2025-05-08T16:29:31.16+00:00

I am navigating from a page where Shell.TabBarIsVisible="False" as its requirement , the page is not showing TabBar in further pages. I tried setting Shell.TabBarIsVisible="True" but not working for following pages.

If these pages are called from other parent pages where Shell.TabBarIsVisible="True" as default if displays tabbar.

And this is happening in only on IOS, Android shows Tabbar normally.

Developer technologies | .NET | .NET MAUI
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Le (WICLOUD CORPORATION) 1,145 Reputation points Microsoft External Staff
    2025-07-25T07:32:44.39+00:00

    Hello,

    This issue stems from iOS's native UITabBarController behavior, where the tab bar visibility state is maintained at the navigation controller level rather than per-page. Unlike Android, iOS doesn't automatically reset this state when navigating to new pages.

    Recommended Workarounds

    To restore the tab bar visibility, explicitly set it in code-behind before navigating:

    Shell.SetTabBarIsVisible(this, true);
    await Shell.Current.GoToAsync("yourNextPageRoute");
    

    Alternative

    If you're already on the destination page, set it in OnAppearing:

    protected override void OnAppearing()
    {
        base.OnAppearing();
        Shell.SetTabBarIsVisible(this, true);
    }
    

    For maximum reliability on iOS, use this pattern:

    protected override void OnAppearing()
    {
        base.OnAppearing();
       
        // Immediate setting
        Shell.SetTabBarIsVisible(this, true);
       
        // Delayed setting to ensure iOS processes the change
        MainThread.BeginInvokeOnMainThread(() =>
        {
            Shell.SetTabBarIsVisible(this, true);
        });
    }
    

    Additional Notes

    • Avoid using modal navigation (PushModalAsync) unless required, as it bypasses Shell behavior
    • Ensure that the navigation context is consistent—navigating from a hidden tab bar context can persist that state
    • This issue affects .NET MAUI versions 6.0 through 9.0 and remains present in current releases
    • Use MainThread.BeginInvokeOnMainThread instead of Device.BeginInvokeOnMainThread (deprecated in .NET 6+)
    • Consider implementing a custom navigation service to centralize tab bar state management

    Alternative Architecture Consideration

    For apps heavily affected by this issue, consider:

    • Using TabbedPage instead of Shell tabs for critical scenarios
    • Implementing custom navigation patterns that avoid the problematic state transitions
    • Creating a centralized navigation service that manages tab bar visibility

    References:

    I hope this helps resolve the issue.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.