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

feat: allows the consumer to disable face up/down detection on ios #228

Merged
merged 1 commit into from
Jul 30, 2022

Conversation

demedos
Copy link
Contributor

@demedos demedos commented May 17, 2022

iOS implements the face up and down detection, but a common requirement is to get to know the portrait or landscape status regardless of the facing direction of the device.
This merge request adds the possibility to ignore the facing of the device by calling a configuration function, which should be called as soon as possible and before any other orientation call (ie. in your index.js of App.js).

Usage

Orientation.configure({ disableFaceUpDown: true })

Under the hood, it relies on the status bar orientation whenever a face up/down is detected.

Please note that [UIApplication sharedApplication].statusBarOrientation has been deprecated since iOS 13, but checking against the device width being greater that its height would loose the information about it being in landscape right or landscape left

Verified

This commit was signed with the committer’s verified signature.
woodruffw William Woodruff
@demedos demedos force-pushed the master branch 2 times, most recently from 43d9b2a to fa31f4a Compare May 17, 2022 10:17
@wonday wonday merged commit 63354d6 into wonday:master Jul 30, 2022
@wonday
Copy link
Owner

wonday commented Jul 30, 2022

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants