dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.99k stars 1.72k forks source link

Safe Area not working for iOS #19720

Open s153625 opened 8 months ago

s153625 commented 8 months ago

Description

I have a problem with the safe area for iOS. I used the sample project to recreate the problem When I push the "click" me button, a modalPage with be pushed with Navigation.PushModalAsync. If I use ios:Page.UseSafeArea="False", it still has a safeArea and look like this: ffiZ4JLekX

However, if I set IgnoreSafeArea="True" on the stacklayout instead, it will work as I intend: imL71oZd94

Steps to Reproduce

  1. Create a file > New .Net Maui App
  2. Add Navigation.PushModalAsync(new MainPage()); in OnCounterClicked
  3. Add
    xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls" ios:Page.UseSafeArea="False" to MainPage.Xaml. Expected outcome: There is no safe area actual outcome: Safe area is still there

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

My workaround is to use IgnoreSafeArea="True", however it seems inconvenient to do as it has to be done for each grid/stacklayouts, also sometimes for the inner ones.

Relevant log output

No response

ghost commented 8 months ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

ValonK commented 8 months ago

I'm encountering the same problem on iOS.

asi-evin commented 5 months ago

Same here, experience this in 8.10

phillippschmedt commented 5 months ago

Same issue here on 8.0.14

bulubuloa commented 5 months ago

Same issue here on 8.0.14

FlavioGoncalves-Cayas commented 5 months ago

Same issue on 8.0.20

AdrianoBinhara commented 3 months ago

same problem here