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

fix: make method for checking if trait is set #1155

Merged
merged 2 commits into from
Sep 28, 2021

Conversation

WoLewicki
Copy link
Member

@WoLewicki WoLewicki commented Sep 28, 2021

Description

PR exposing a way to check if there was a window trait (status bar or orientation) set by user in any of the navigators. In such case, it should take precedence over other methods, like expo-screen-orientation. Calling

+ (BOOL)shouldAskScreensForTrait:(RNSWindowTrait)trait
                 includingModals:(BOOL)includingModals
                inViewController:(UIViewController *)vc;

should return NO if there was no screen in view hierarchy that requests a specific trait and YES otherwise.

PR to be used e.g. in Expo.

These methods are used by providing their exact signature as a string and therefore their name should not be changed.

Checklist

@WoLewicki WoLewicki merged commit c6157d0 into master Sep 28, 2021
@WoLewicki WoLewicki deleted the @wolewicki/expo-screen-orientation branch September 28, 2021 09:50
@dohooo
Copy link

dohooo commented Sep 28, 2021

hi~ When is the next release coming @kacperkapusciak

lukmccall added a commit to expo/expo that referenced this pull request Sep 28, 2021
…ntation prop (#14541)

# Why

Fixes software-mansion/react-native-screens#1152.

# How

Uses method added in software-mansion/react-native-screens#1155 to determine if we should use screen orientation from react-native-screens. 

# Test Plan

- bare rn project ✅
- https://snack.expo.dev/9LZ5ItpXl
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.

3 participants