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

Safe view area for modal view #279

Open
hyhypepe opened this issue Aug 5, 2019 · 3 comments
Open

Safe view area for modal view #279

hyhypepe opened this issue Aug 5, 2019 · 3 comments

Comments

@hyhypepe
Copy link

hyhypepe commented Aug 5, 2019

I can't wrap Modal component by SafeAreaView to handle layout properly in iOS device. Have anyone ever faced this issue? Please support me. Thank you

@steveyu2
Copy link

steveyu2 commented Oct 8, 2019

+1

@riosjr
Copy link

riosjr commented Dec 27, 2019

any news on that?

@lklima
Copy link

lklima commented Jan 26, 2020

I fixed this issue with https://github.com/miyabi/react-native-safe-area library, setting bottom on modal style:

`SafeArea.getSafeAreaInsetsForRootView().then((result) => {
    const bottom = Platform.OS === 'ios' ? result.safeAreaInsets.bottom : 0;
    this.setState({ bottom });
  });`

and:

     `<Modal
        style={[styles.modalContainer, { bottom }]}
        isOpen={isOpen}
        position="bottom"
        backButtonClose={false}
        backdrop={false}
        swipeToClose={false}
      >
        <Text style={styles.modalText}>
          {sdText}, {userName}
        </Text>`

Hope this helps!

Captura de Tela 2020-01-26 às 11 42 59

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

No branches or pull requests

4 participants