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

Handle Safe Area on iOS. It's an Opt in via Interface #895

Merged
merged 2 commits into from
May 6, 2021

Conversation

Clancey
Copy link
Contributor

@Clancey Clancey commented Apr 29, 2021

This allows iOS to handle Safe Area automatically, if you opt into it vie the Interface, ISafeAreaView

@Clancey Clancey requested a review from hartez April 29, 2021 23:34
var bounds = Frame.ToRectangle();
if(View is ISafeAreaView sav && !sav.IgnoreSafeArea)
{
var safe = SafeAreaInsets;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Maui support prior to iOS 10?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a single RespondsToSelector check, so it will not crash on any OS version.

@Clancey Clancey force-pushed the Safe-Area branch 2 times, most recently from e7fe802 to 7fe44b9 Compare May 5, 2021 01:13
@hartez hartez merged commit d547fca into dotnet:main May 6, 2021
rmarinho pushed a commit that referenced this pull request May 7, 2021
* Handle Safe Area on iOS. It's an Opt in via Interface

* Added a check to SafeArea
@samhouts samhouts added area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/iOS 🍎 labels Jul 11, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
@samhouts samhouts added the fixed-in-6.0.100-preview.5 Look for this fix in 6.0.100-preview.5! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter fixed-in-6.0.100-preview.5 Look for this fix in 6.0.100-preview.5! platform/iOS 🍎
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants