Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safe Area not working for iOS #19720

Open
s153625 opened this issue Jan 5, 2024 · 10 comments
Open

Safe Area not working for iOS #19720

s153625 opened this issue Jan 5, 2024 · 10 comments
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/iOS 🍎 t/bug Something isn't working
Milestone

Comments

@s153625
Copy link

s153625 commented Jan 5, 2024

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

@s153625 s153625 added the t/bug Something isn't working label Jan 5, 2024
@jsuarezruiz jsuarezruiz added platform/iOS 🍎 area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter labels Jan 8, 2024
@jsuarezruiz jsuarezruiz added this to the Backlog milestone Jan 8, 2024
@ghost
Copy link

ghost commented Jan 8, 2024

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.

@samhouts samhouts added the migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert label Jan 9, 2024
@ValonK
Copy link

ValonK commented Jan 10, 2024

I'm encountering the same problem on iOS.

@asi-evin
Copy link

asi-evin commented Mar 21, 2024

Same here, experience this in 8.10

@phillippschmedt
Copy link

phillippschmedt commented Apr 2, 2024

Same issue here on 8.0.14

1 similar comment
@bulubuloa
Copy link

Same issue here on 8.0.14

@FlavioGoncalves-Cayas
Copy link

Same issue on 8.0.20

@AdrianoBinhara
Copy link

same problem here

@dasunmax89
Copy link

same problem here.

@MateuszLas421
Copy link

same problem

@Marini88
Copy link

Marini88 commented Dec 2, 2024

Same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests