-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Change orientation detection mechanism on iOS #4918
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
Conversation
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.
Working as expected. Some comments on platform checks.
|
Thank you for your review. I think all the issues you reported should be fixed. |
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 wonder if I should add a tvOS CI-job as well. It's not official yet but will at least give a notice on incompatibles.
The main change in to use the interface orientation and not the device orientation. This may be different for example when locking the orientation. This also changes the way orientation changes are detected using the documented method. However this means dropping support for iOS 7 as this method is only available since iOS 8, and alternative methods available in iOS 7 have been deprecated in iOS 13. Another change is to properly detect the interface orientation instead of infering it from the view bounds, which was incorrect on some devices.
This was used in the past to make sure the code can be compiled with old compilers that do not support using @available. But we already dropped support for those old compilers, and in many places already used @available without checking first that it can be used.
|
I have rebased on current master and made the necessary modifications to fix the compilation when targeting TvOS. |
This should fix incorrect orientation being detected on some devices, which caused the virtual keyboard to appear in landscape mode instead of portrait mode.
This includes three main changes that are tied to each others: