Skip to content

[iOS 27] Shell tab bar never re-evaluates More after a size class change: ShellItemRenderer.TraitCollectionDidChange doesn't call base #39263

Closed

Description

@chucksmith

Description

On iOS 27, UITabBarController re-evaluates how many tabs fit before More inside its own traitCollectionDidChange:. ShellItemRenderer overrides that method (added in #29093, "Auto Resize chrome icons") and never calls base, so the re-evaluation never runs:

public override void TraitCollectionDidChange(UITraitCollection previousTraitCollection)
{
    if (previousTraitCollection.VerticalSizeClass == TraitCollection.VerticalSizeClass)
        return;

    foreach (var item in TabBar.Items)
        item.Image = TabbedViewExtensions.AutoResizeTabBarImage(TraitCollection, item.Image);
}

Visible effect on a foldable iPhone (iPhone Duo simulator, Xcode 27.1 RC), Shell with 8 tabs, folded in landscape:

  1. Launch: the vertical tab rail shows 4 tabs + More. Correct.
  2. Unfold: the size class becomes regular and UIKit shows all 8 tabs. Correct.
  3. Fold again: the size class goes back to compact, but tabBar.items keeps all 8. The rail no longer fits the panel and iOS collapses it into a single floating button. Tapping it animates and collapses back, so the user can't switch tabs at all.

A plain UIKit app with the same 8 tabs goes back to 4 + More every time (5/5). Adding the same override without super to that native app reproduces MAUI's behavior exactly (5/5). Both apps are in the repro below.

Not the cause, for anyone reading ShellItemRenderer: the maxTabs = 5 constants there only set IsInMoreTab, which routes push/pop into MoreNavigationController. They don't decide what the tab bar shows.

Steps to Reproduce

  1. Build the repro for the simulator with Xcode 27.1 and install it on the "iPhone Duo" device.
  2. Fold the device and rotate it to landscape (Device Hub), then launch: 4 tabs + More.
  3. Unfold, then fold again: the rail collapses into one button that doesn't open.

Full commands, including scripted folding with hinge, are in the repro's README.

Link to public reproduction project repository

https://github.com/chucksmith/ShellTabRailRepro-Maui

Version with bug

10.0.110 (Microsoft.Maui.Controls). The method is unchanged on main.

Is this a regression from previous behavior?

Yes, this used to work in a previous version of .NET MAUI (the override was added in #29093; before it, UIKit's implementation ran). The visible symptom only appears with iOS 27's tab rail.

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 27.1 (simulator, iPhone Duo). Xcode 27.1 RC 27A9275, runtime 24A94232.

Did you find any workaround?

Yes. A ShellItemRenderer subclass that calls UITabBarController's implementation directly (a C# base call only reaches the Shell override), then restores CustomizableViewControllers, because UIKit's re-evaluation resets it and the More page gains an Edit button. It recovered 4 + More after the refold in 10/10 runs. It's in the repro (TraitFixShellItemRenderer.cs, build with -p:DefineConstants=WITH_FIX).

Suggested fix in MAUI: call base.TraitCollectionDidChange(previousTraitCollection) first, then reset CustomizableViewControllers = Array.Empty<UIViewController>(). PR to follow.

Separately: the dotnet new maui template crashes at launch on iOS 27 without the UIScene manifest and a SceneDelegate. The repro includes both.

Relevant log output

None.

Activity

  1. kubaflo commented on Oct 8, 2026

    @kubaflo
    Contributor

    /issue triage

  2. NafeelaNazhir commented on Oct 9, 2026

    @NafeelaNazhir
    Contributor

    This issue has been validated in Visual Studio Code 1.141.0 with .NET MAUI versions 10.0.0 and 10.0.110. It can be reproduced on the iOS 27.1 platform.

    Screen.Recording.2026-10-09.at.10.20.37.AM.mov
  3. added
    t/bug
    area-controls-shell
    s/verified
    s/triaged
    on Oct 9, 2026
  4. added a commit that references this issue on Oct 9, 2026
    e0eb61a
  5. added this to the .NET 10 SR12 milestone on Oct 9, 2026
  6. kubaflo commented on Oct 10, 2026

    @kubaflo
    Contributor

    Thank you for the report and the investigation details. We are closing this as completed: ShellItemRenderer restores UIKit's base trait-change callback and reasserts the empty CustomizableViewControllers invariant, allowing the More tab to update after the reported size-class change.

    Supporting evidence: #39264 (merged into inflight/current).

    This records the merged source change; it does not imply that the fix is present in every released .NET MAUI package.

    If you can still reproduce the reported behavior in a build that includes the linked change, please comment here with the exact version and reproduction details so we can reopen and investigate. The existing reproduction and discussion remain available; a new issue is not required.

  7. added 7 commits that reference this issue on Oct 12, 2026
    3b2513c
    30a10b4
    811acfc
    212a8f4
    a1c1af2
    4284355
    19f6ad2
  8. locked and limited conversation to collaborators on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-shellplatform/ioss/triageds/verifiedt/bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions