Skip to content

Commit

Permalink
Revert default for UseSafeAreaProperty to value from .NET 6 for iOS (d…
Browse files Browse the repository at this point in the history
…otnet#16093)

* Revert default for UseSafeAreaProperty to value from .NET 6 for iOS
Fixes dotnet#12823

* Update to ignore broken iOS test for now

* Fix shell tab test
  • Loading branch information
hartez authored Jul 19, 2023
1 parent 6136a8a commit 71e6bb5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ public static IPlatformElementConfiguration<iOS, FormsElement> SetPreferredStatu
}

/// <summary>Bindable property for attached property <c>UseSafeArea</c>.</summary>
#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

/// <include file="../../../../docs/Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific/Page.xml" path="//Member[@MemberName='GetUseSafeArea']/Docs/*" />
public static bool GetUseSafeArea(BindableObject element)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<iOS>().SetUseSafeArea(true);
pageWithoutTopTabs.On<iOS>().SetUseSafeArea(true);

var mainTab1 = new Tab()
{
Items =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ await CreateHandlerAndAddToWindow<WindowHandlerStub>(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
Expand Down

0 comments on commit 71e6bb5

Please sign in to comment.