diff --git a/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs index f3b2044b33f1..34101206ca7b 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs @@ -1535,7 +1535,21 @@ 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)) + && TabBarController is { } tbc + && !tbc.TabBar.Hidden + && tbc.TabBar.Translucent) + { + edges |= UIRectEdge.Bottom; + } + + EdgesForExtendedLayout = edges; base.ViewWillAppear(animated); } diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue35490.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue35490.cs new file mode 100644 index 000000000000..ed871615ee72 --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue35490.cs @@ -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" }); + } +} diff --git a/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/NavigationPageChildContentExtendsUnderFloatingTabBar.png b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/NavigationPageChildContentExtendsUnderFloatingTabBar.png new file mode 100644 index 000000000000..0b8424ca0a6b Binary files /dev/null and b/src/Controls/tests/TestCases.Mac.Tests/snapshots/mac/NavigationPageChildContentExtendsUnderFloatingTabBar.png differ diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35490.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35490.cs new file mode 100644 index 000000000000..df686a039a2f --- /dev/null +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35490.cs @@ -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. +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(); + } +} +#endif diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/NavigationPageChildContentExtendsUnderFloatingTabBar.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/NavigationPageChildContentExtendsUnderFloatingTabBar.png new file mode 100644 index 000000000000..ceeec21015f8 Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/NavigationPageChildContentExtendsUnderFloatingTabBar.png differ diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/NavigationPageChildContentExtendsUnderFloatingTabBar.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/NavigationPageChildContentExtendsUnderFloatingTabBar.png new file mode 100644 index 000000000000..67199599de24 Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/NavigationPageChildContentExtendsUnderFloatingTabBar.png differ