React-native 关于键盘遮挡界面问题

//引入 KeyboardAvoidingView 
import { KeyboardAvoidingView } from 'react-native';

//使用 KeyboardAvoidingView 
render(){
    return <KeyboardAvoidingView behavior={'padding'} style={{flex: 1}}>
        {/*具体页面内容*/}
    </KeyboardAvoidingView>
}

//android 已经处理 其实只需要处理Ios 就可以了  

但是有个问题 当使用scrollView  时,再其中的元素依旧会被遮挡,需要注意

通常在框架搭建之初就应该添加适配写法

原文地址:https://www.cnblogs.com/web-Rain/p/11712210.html