Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1535,7 +1535,20 @@ public override void ViewWillAppear(bool animated)
var isTranslucent = false;
if (_navigation.TryGetTarget(out n))
isTranslucent = n.NavigationBar.Translucent;
EdgesForExtendedLayout = isTranslucent ? UIRectEdge.All : UIRectEdge.None;

var edges = isTranslucent ? UIRectEdge.All : UIRectEdge.None;

// On iOS/MacCatalyst 26+, the tab bar renders as a floating glass overlay.
// Extend behind it when inside a visible UITabBarController so content
// isn't clipped at the old tab bar boundary.
if ((OperatingSystem.IsIOSVersionAtLeast(26) || OperatingSystem.IsMacCatalystVersionAtLeast(26))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[major] iOS/MacCatalyst Platform Specifics — This extends the bottom edge for every visible UITabBarController on iOS/MacCatalyst 26+, regardless of the MAUI TabbedPage translucency setting. Concrete scenario: an app sets TabbedPage.On<iOS>().SetTranslucencyMode(TranslucencyMode.Opaque) to keep content above an opaque tab bar; this branch still opts the navigation child into bottom extension whenever the tab bar is visible. Please scope this to the default/floating-glass case or respect TabBar.Translucent/the MAUI translucency mode so explicit opaque tab bars keep their existing layout behavior.

&& TabBarController is { } tbc
&& !tbc.TabBar.Hidden)
{
edges |= UIRectEdge.Bottom;
}

EdgesForExtendedLayout = edges;

base.ViewWillAppear(animated);
}
Expand Down
41 changes: 41 additions & 0 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue35490.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using TabbedPage = Microsoft.Maui.Controls.TabbedPage;

namespace Maui.Controls.Sample.Issues;

[Issue(IssueTracker.Github, 35490, "[iOS 26] TabbedPage with NavigationPage children clips content above floating glass tab bar", PlatformAffected.iOS)]
public class Issue35490 : TabbedPage
{
public Issue35490()
{
var page1 = new ContentPage
{
Title = "Tab1",
BackgroundColor = Colors.MediumPurple,
Content = new Label
{
AutomationId = "Tab1Label",
Text = "Tab 1 — on iOS 26+, test passes if purple background extends under the floating tab bar",
TextColor = Colors.White,
VerticalOptions = LayoutOptions.Center,
HorizontalOptions = LayoutOptions.Center,
},
};

var page2 = new ContentPage
{
Title = "Tab2",
BackgroundColor = Colors.DarkCyan,
Content = new Label
{
AutomationId = "Tab2Label",
Text = "Tab 2 — on iOS 26+, test passes if cyan background extends under the floating tab bar",
TextColor = Colors.White,
VerticalOptions = LayoutOptions.Center,
HorizontalOptions = LayoutOptions.Center,
},
};

Children.Add(new NavigationPage(page1) { Title = "Tab1" });
Children.Add(new NavigationPage(page2) { Title = "Tab2" });
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#if IOS || MACCATALYST // The floating glass tab bar is a UIKit-only feature introduced in iOS/MacCatalyst 26. This issue does not affect Android or Windows.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[major] Regression Prevention and Test Coverage - This test compiles for MacCatalyst (#if IOS || MACCATALYST) and uses VerifyScreenshot(), but the PR only adds iOS baselines. VerifyScreenshot uses the mac snapshot environment for TestDevice.Mac, so the Mac test shard will look for src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/NavigationPageChildContentExtendsUnderFloatingTabBar.png and fail without it. Please either add the Mac baseline or restrict this screenshot test to iOS only.

using NUnit.Framework;
using UITest.Appium;
using UITest.Core;

namespace Microsoft.Maui.TestCases.Tests.Issues;

public class Issue35490 : _IssuesUITest
{
public Issue35490(TestDevice testDevice) : base(testDevice)
{
}

public override string Issue => "[iOS 26] TabbedPage with NavigationPage children clips content above floating glass tab bar";

[Test]
[Category(UITestCategories.TabbedPage)]
public void NavigationPageChildContentExtendsUnderFloatingTabBar()
{
App.WaitForElement("Tab1Label");
VerifyScreenshot();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[major] Regression Prevention and Test Coverage - The committed iOS 26 screenshot baseline does not match the PR's actual fixed rendering: the saved gate result still failed with a 1.82% mismatch after the production fix, while updating the iOS 26 baseline to the actual PR rendering made the targeted test pass. Please update snapshots/ios-26/NavigationPageChildContentExtendsUnderFloatingTabBar.png so this regression test is green with the fix.

}
}
#endif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading