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

[ios] switch react native ios landscape-left/landscape-right mappings #2

Merged
merged 1 commit into from
Sep 21, 2022

Conversation

nealmanaktola
Copy link

This PR changes the iOS implementation to lock to device orientation not interface orientation

https://developer.apple.com/documentation/uikit/uiinterfaceorientation

Notice that UIDeviceOrientation.landscapeRight is assigned to UIInterfaceOrientation.landscapeLeft and UIDeviceOrientation.landscapeLeft is assigned to UIInterfaceOrientation.landscapeRight. The reason for this is that rotating the device requires rotating the content in the opposite direction.

@nealmanaktola nealmanaktola changed the title [ios] switch react native ios mappings [ios] switch react native ios landscape-left/landscape-right mappings Sep 21, 2022
Copy link

@donaldchen donaldchen left a comment

Choose a reason for hiding this comment

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

Looks good! I feel like this should get merged to https://github.com/yamill/react-native-orientation as well, but it looks like there hasn't been any changes on master since 2018

@nealmanaktola nealmanaktola force-pushed the nealm/switch-ios-orientation branch from 929ca37 to ed0ed64 Compare September 21, 2022 16:06
@nealmanaktola nealmanaktola merged commit a5a315a into 3.1.3-discord-1 Sep 21, 2022
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.

2 participants