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

RFValue offset for unsafe iPhoneX #50

Open
hsj1514 opened this issue Jul 29, 2021 · 1 comment
Open

RFValue offset for unsafe iPhoneX #50

hsj1514 opened this issue Jul 29, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@hsj1514
Copy link

hsj1514 commented Jul 29, 2021

look at the offset of RFValue, for iPhone X, you are assigning a value of 78. This is probably 44 returned by getStatusBarHeight plus 34 returned by getBottomSpace. However, according to the 'react-native-iphone-x-helper' document, for unsafe iPhoneX, getStatusBarHeight returns 30. Therefore, offset cannot always be 78. Therefore, it seems reasonable to modify 78 to getStatusBarHeight() + getBottomSpace().

@heyman333
Copy link
Owner

Thanks @hsj1514 😀

you mean

  const offset =
    width > height ? 0 : Platform.OS === "ios" ? getStatusBarHeight() + getBottomSpace() : StatusBar.currentHeight; // iPhone X style SafeAreaView size in portrait

right?

@heyman333 heyman333 added the enhancement New feature or request label Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants