-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
var bounds = Frame.ToRectangle(); | ||
if(View is ISafeAreaView sav && !sav.IgnoreSafeArea) | ||
{ | ||
var safe = SafeAreaInsets; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs a check if you're on iOS 10
https://developer.apple.com/documentation/uikit/uiview/2891103-safeareainsets
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
There was a problem hiding this comment.
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.
e7fe802
to
7fe44b9
Compare
* Handle Safe Area on iOS. It's an Opt in via Interface * Added a check to SafeArea
This allows iOS to handle Safe Area automatically, if you opt into it vie the Interface, ISafeAreaView