Skip to content

[iOS 26] Fix tab bar ghosting when navigating from modal to tabbed Shell content#34254

Open
SubhikshaSf4851 wants to merge 3 commits intodotnet:mainfrom
SubhikshaSf4851:Fix-34143
Open

[iOS 26] Fix tab bar ghosting when navigating from modal to tabbed Shell content#34254
SubhikshaSf4851 wants to merge 3 commits intodotnet:mainfrom
SubhikshaSf4851:Fix-34143

Conversation

@SubhikshaSf4851
Copy link
Contributor

@SubhikshaSf4851 SubhikshaSf4851 commented Feb 26, 2026

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Root Cause

iOS 26 introduced the Liquid Glass rendering system for the tab bar. In ShellItemTransition, setting newView.Alpha = 0 before the cross-fade animation causes iOS 26 to composite the Liquid Glass tab bar icons while the parent view is at zero opacity. When the animation restores alpha = 1, the glass pill appears with the selected tab icon missing because the Liquid Glass layer already cached its content at zero opacity.

Description of Change

  • Updated ShellItemTransition.cs to skip setting newView.Alpha = 0 on iOS 26+, preventing
    Liquid Glass tab bar icons from being composited while the parent view is transparent.
  • The cross-fade animation still runs on iOS 26+ (animating from the default alpha = 1),
    so the visual transition is preserved.
  • Added missing using System; directive required for OperatingSystem.IsIOSVersionAtLeast(26).

Test coverage for the regression:

  • Introduced a new test case in TestCases.HostApp (Issue34143.cs) that reproduces the navigation scenario and ensures the tab bar renders correctly after navigating from a modal.
  • Added a UI test (TestCases.Shared.Tests/Tests/Issues/Issue34143.cs) to automate validation that the tab bar is visible and interactable after the specific navigation flow, preventing regressions.

Issues Fixed

Fixes #34143

Tested the behaviour in the following platforms

  • Windows
  • Android
  • iOS
  • Mac

Screenshot

Before Issue Fix After Issue Fix
Simulator Screenshot - iPhone 17 Pro - 2026-02-25 at 16 06 31 Simulator Screenshot - iPhone 17 - 2026-02-27 at 11 19 31

@dotnet-policy-service
Copy link
Contributor

Hey there @@SubhikshaSf4851! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels Feb 26, 2026
@karthikraja-arumugam karthikraja-arumugam added area-controls-shell Shell Navigation, Routes, Tabs, Flyout version/iOS-26 labels Feb 26, 2026
@sheiksyedm sheiksyedm added this to the .NET 10 SR5 milestone Feb 26, 2026
@github-actions
Copy link
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34254

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34254"

@sheiksyedm sheiksyedm marked this pull request as ready for review February 27, 2026 15:05
Copilot AI review requested due to automatic review settings February 27, 2026 15:05
@sheiksyedm
Copy link
Contributor

/azp run maui-pr-uitests , maui-pr-devicetests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a tab bar ghosting issue on iOS 26 caused by the new Liquid Glass rendering system. When navigating from a modal to tabbed Shell content using GoToAsync, tab bar icons would appear missing or ghosted. The root cause is that setting newView.Alpha = 0 before the cross-fade animation in ShellItemTransition causes iOS 26 to composite the Liquid Glass tab bar icons while the parent view is at zero opacity, resulting in incorrect rendering when alpha is restored to 1.

Changes:

  • Modified ShellItemTransition.cs to skip setting alpha to 0 on iOS 26+, allowing the cross-fade animation to start from the default alpha=1
  • Added comprehensive UI test reproducing the modal-to-tabs navigation scenario
  • Added snapshot images for iOS, iOS 26, and Android platforms

Reviewed changes

Copilot reviewed 3 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellItemTransition.cs Added iOS 26+ version check to skip setting newView.Alpha = 0, fixing Liquid Glass tab bar icon compositing issue
src/Controls/tests/TestCases.HostApp/Issues/Issue34143.cs Created test host app with Shell structure: Home page → Modal → TabBar navigation flow using TestShell base class
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue34143.cs Added UI test verifying tab bar visibility after modal-to-tabs navigation via GoToAsync
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/TabBarShouldBeVisibleAfterNavigatingFromModalViaGoToAsync.png Snapshot for iOS (pre-26) showing correct tab bar rendering
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/TabBarShouldBeVisibleAfterNavigatingFromModalViaGoToAsync.png Snapshot for iOS 26+ showing correct Liquid Glass tab bar rendering
src/Controls/tests/TestCases.Android.Tests/snapshots/android/TabBarShouldBeVisibleAfterNavigatingFromModalViaGoToAsync.png Snapshot for Android showing tab bar baseline (not affected by iOS 26 issue)

// tab bar icons to composite while the parent view has zero alpha, resulting in
// icons not rendering. Skip setting alpha to 0 so
// the tab bar view stays at its default alpha=1 when iOS 26 composites its icons.
if (!OperatingSystem.IsIOSVersionAtLeast(26))
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MacCatalyst version check is missing. Based on the codebase pattern (see NavigationRenderer.cs:1621, ShellPageRendererTracker.cs:291, etc.), iOS 26+ version checks should also include MacCatalyst 26+ to ensure consistent behavior across Apple platforms. The Liquid Glass tab bar rendering issue likely affects MacCatalyst as well.

Add the MacCatalyst check to match the established pattern:

if (!OperatingSystem.IsIOSVersionAtLeast(26) && !OperatingSystem.IsMacCatalystVersionAtLeast(26))
Suggested change
if (!OperatingSystem.IsIOSVersionAtLeast(26))
if (!OperatingSystem.IsIOSVersionAtLeast(26) && !OperatingSystem.IsMacCatalystVersionAtLeast(26))

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-shell Shell Navigation, Routes, Tabs, Flyout community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration version/iOS-26

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS] Tab bar ghosting issue on iOS 26 (liquid glass)

4 participants