使用本机基本内容结构时,如何在IOS中修复“ KeyboardAvoidingView”

时间:2019-07-10 23:07:49

标签: react-native expo native-base

我使用KeyboardAvoidingView来显示聚焦的输入,但是当显示键盘时,scrollView paddingBottom会更改并与Form重叠。

<Container style={styles.container}>
  <Content contentContainerStyle={{flex:1}} scrollEnabled={false} enableOnAndroid  >{/* styles.content */}
    <ScrollView style={{flex: 1}} automaticallyAdjustContentInsets={true} indicatorStyle="white" >
      <KeyboardAvoidingView behavior="padding" enabled={Platform.OS === 'android' ? true : false} style={styles.keyboardAvoidingView} keyboardVerticalOffset={60} >
        <Form style={{margin:20,marginRight:35}}>
          <Input>
            {/*... Some Inputs*/}
          </Input>
        </Form>
      </KeyboardAvoidingView>
    </ScrollView>
  </Content>
</Container>

图片1: enter image description here

图片2: enter image description here

图片3: enter image description here

0 个答案:

没有答案