diff --git a/src/Controls/src/Core/PlatformConfiguration/iOSSpecific/Page.cs b/src/Controls/src/Core/PlatformConfiguration/iOSSpecific/Page.cs index 287117e4b465..79b0ce75e475 100644 --- a/src/Controls/src/Core/PlatformConfiguration/iOSSpecific/Page.cs +++ b/src/Controls/src/Core/PlatformConfiguration/iOSSpecific/Page.cs @@ -72,7 +72,11 @@ public static IPlatformElementConfiguration SetPreferredStatu } /// Bindable property for attached property UseSafeArea. +#if MACCATALYST public static readonly BindableProperty UseSafeAreaProperty = BindableProperty.Create("UseSafeArea", typeof(bool), typeof(Page), true); +#else + public static readonly BindableProperty UseSafeAreaProperty = BindableProperty.Create("UseSafeArea", typeof(bool), typeof(Page), false); +#endif /// public static bool GetUseSafeArea(BindableObject element) diff --git a/src/Controls/tests/DeviceTests/Elements/Shell/ShellTests.iOS.cs b/src/Controls/tests/DeviceTests/Elements/Shell/ShellTests.iOS.cs index 0036037ba333..288b499a5244 100644 --- a/src/Controls/tests/DeviceTests/Elements/Shell/ShellTests.iOS.cs +++ b/src/Controls/tests/DeviceTests/Elements/Shell/ShellTests.iOS.cs @@ -31,6 +31,9 @@ public async Task PageAdjustsWhenTopTabsArePresent() var pageWithTopTabs = new ContentPage() { Content = new Label() { Text = "Page With Top Tabs" } }; var pageWithoutTopTabs = new ContentPage() { Content = new Label() { Text = "Page With Bottom Tabs" } }; + pageWithTopTabs.On().SetUseSafeArea(true); + pageWithoutTopTabs.On().SetUseSafeArea(true); + var mainTab1 = new Tab() { Items = diff --git a/src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs b/src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs index 1d68386c25f4..d02b201999c4 100644 --- a/src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs +++ b/src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs @@ -251,7 +251,11 @@ await CreateHandlerAndAddToWindow(new Window(tabbedPage), asy } #endif +#if IOS + [Theory(Skip = "Test doesn't work on iOS yet; probably because of https://github.com/dotnet/maui/issues/10591")] +#else [Theory] +#endif #if ANDROID [InlineData(true)] #endif